Number
Standard Bindings
A number provides the following standard bindings:
returns | service | description |
Number | this + aNumber | Addition. Returns the sum of this and aNumber. |
Number | - aNumber | Subtraction. Returns the difference between this and aNumber. |
Number | * aNumber | Multiplication. Returns the product of this and aNumbr. |
Number | this / aNumber | Division. Returns the result of the division of this and aNumber. |
Number | this % aNumber | Modulo. Returns the remainder of the integral division of this and aNumber. |
Number | - this | Negation. Returns the negative of this. |
Number | this.trunc() | Truncation. Returns the integral part of this number. |
Number | this.abs() | Absolute value. Returns the absolute value of this number. |
Boolean | this < aNumber | Smaller. Returns true if this is smaller than aNumber, false otherwise. |
Boolean | this > aNumber | Greater. Returns true if this is greater than aNumber, false otherwise. |
Boolean | this <= aNumber | Smaller or Equal. Returns true if this is smaller than or equal to aNumber, false otherwise. |
Boolean | this >= aNumber | Greater or Equal. Returns true if this is greater than or equal to aNumber, false otherwise. |
Boolean | this == aNumber | Equal. Returns true if this equal to aNumber, false otherwise. |
Boolean | this != aNumber | Not Equal. Returns true if this is not equal to aNumber, false otherwise. |
JPiccola
In JPiccola, a boolean additionally provides the following bindings:
Class | this.getClass() | Returns the class of this. |