( begin auto-generated from abs.xml ) Calculates the absolute value (magnitude) of a number. The absolute value of a number is always positive. ( end auto-generated ) @webref math:calculation @param n number to compute
(float n)
| 4455 | * @param n number to compute |
| 4456 | */ |
| 4457 | static public final float abs(float n) { |
| 4458 | return (n < 0) ? -n : n; |
| 4459 | } |
| 4460 | |
| 4461 | static public final int abs(int n) { |
| 4462 | return (n < 0) ? -n : n; |
no outgoing calls
no test coverage detected