• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

math functions in WE

Status
Not open for further replies.
Level 18
Joined
Mar 21, 2011
Messages
1,622
hi,
is there a way to get rid of some decimal places of a number? for example, i have a floating text that counts down from 3 to 0 in 0.2 steps. now it shows numbers like:
3.000
2.800
2.600
...
0.200
0.000

i want to get rid of the last 2 decimal places:
3.0
2.8
2.6
...
0.2
0.0

is there a way to do that?

thanks
 
There is also native R2SW takes real r, integer width, integer precision returns string where precision is the argument you're looking for.
 
  • Game - Display to (All players) the text: (String(1.23, 1, 2))
It is the next thing after convert real to string.Name is convert real to formatted string.
 
Status
Not open for further replies.
Back
Top