MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / abs

Method abs

Ports/CLDC11/src/java/lang/Math.java:39–41  ·  view source on GitHub ↗
(double a)

Source from the content-addressed store, hash-verified

37 /// Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases: If the argument is positive zero or negative zero, the result is positive zero. If the argument is infinite, the result is positive infinity. If the argument is NaN, the result is NaN. In other words, the result is equal to the value of the expression:
38 /// Double.longBitsToDouble((Double.doubleToLongBits(a)>>1)
39 public static double abs(double a){
40 return 0.0d; //TODO codavaj!!
41 }
42
43 /// Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases: If the argument is positive zero or negative zero, the result is positive zero. If the argument is infinite, the result is positive infinity. If the argument is NaN, the result is NaN. In other words, the result is equal to the value of the expression:
44 /// Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))

Callers 15

ofHoursMinutesMethod · 0.95
buildIdMethod · 0.95
toStringMethod · 0.95
padMethod · 0.95
navigationMovementMethod · 0.95
getFontAscentMethod · 0.95
getFontDescentMethod · 0.95
equalsMethod · 0.95
isIdentityMethod · 0.95
clampMethod · 0.95
computeSettleDurationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected