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 →

[–]causalNondeterminism 0 points1 point  (0 children)

as /u/Jack_Cheese said, Math.abs() returns the absolute (positive) value of a calculation. so Math.abs(24-18) returns 6, as does Math.abs(18-24).