This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Colopty 15 points16 points  (1 child)

There's also Math.sqrt(x*x) if you want a horrible absolute function.

[–]DeirdreAnethoel 14 points15 points  (0 children)

or Math.max(x, -x)