fabs (abs for floating point numbers)

For questions about using Classic.

Post » Thu Dec 16, 2010 12:31 am

How do you access this function (or something similar) in Construct?
Thanks.
B
5
S
1
G
3
Posts: 59
Reputation: 993

Post » Thu Dec 16, 2010 1:08 am

abs(n) works on numbers, either integer or float.

If you just need the positive value of a number, you could also do sign(n) * n
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Thu Dec 16, 2010 4:32 pm

Also, if you happen to need to convert an int or string to a floating point number, there is float() for that.

http://sourceforge.net/apps/mediawiki/c ... xpressions

Lots of other system expressions are described in the wiki link above, if you haven't seen it.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests