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

Method abs

vm/JavaAPI/src/java/lang/Math.java:47–47  ·  view source on GitHub ↗

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,

(double a)

Source from the content-addressed store, hash-verified

45 * Double.longBitsToDouble((Double.doubleToLongBits(a)<<1)>>>1)
46 */
47 public static native double abs(double a);
48
49 /**
50 * 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:

Callers 15

normalizeMethod · 0.95
actionPerformedMethod · 0.95
dragWasActuallyATapMethod · 0.95
paintMethod · 0.95
animateToMethod · 0.95
pointerDraggedMethod · 0.95
animateToMethod · 0.95
pointerDraggedMethod · 0.95
equalsMethod · 0.95
equalsMethod · 0.95
drawCircleMethod · 0.95
pointerDraggedMethod · 0.95

Calls

no outgoing calls

Tested by 15

imagesWithinToleranceMethod · 0.76
formatRatioMethod · 0.76
formatDecimalMethod · 0.76
runTestMethod · 0.76
assertFilterBlurMethod · 0.76
isIdentityMethod · 0.76
assertSamplesMethod · 0.76
runTestMethod · 0.76