Calculates the absolute value (magnitude) of a number. The absolute value of a number is always positive. @webref math:calculation @webBrief Calculates the absolute value (magnitude) of a number @param n number to compute
(float n)
| 4032 | * @param n number to compute |
| 4033 | */ |
| 4034 | static public final float abs(float n) { |
| 4035 | return (n < 0) ? -n : n; |
| 4036 | } |
| 4037 | |
| 4038 | static public final int abs(int n) { |
| 4039 | return (n < 0) ? -n : n; |
no outgoing calls
no test coverage detected