Piccola / Interfaces / Number Index

Number

Standard Bindings

A number provides the following standard bindings:

returnsservicedescription
Numberthis + aNumberAddition. Returns the sum of this and aNumber.
Number- aNumberSubtraction. Returns the difference between this and aNumber.
Number* aNumberMultiplication. Returns the product of this and aNumbr.
Numberthis / aNumberDivision. Returns the result of the division of this and aNumber.
Numberthis % aNumberModulo. Returns the remainder of the integral division of this and aNumber.
Number- thisNegation. Returns the negative of this.
Numberthis.trunc()Truncation. Returns the integral part of this number.
Numberthis.abs()Absolute value. Returns the absolute value of this number.
Booleanthis < aNumberSmaller. Returns true if this is smaller than aNumber, false otherwise.
Booleanthis > aNumberGreater. Returns true if this is greater than aNumber, false otherwise.
Booleanthis <= aNumberSmaller or Equal. Returns true if this is smaller than or equal to aNumber, false otherwise.
Booleanthis >= aNumberGreater or Equal. Returns true if this is greater than or equal to aNumber, false otherwise.
Booleanthis == aNumberEqual. Returns true if this equal to aNumber, false otherwise.
Booleanthis != aNumberNot Equal. Returns true if this is not equal to aNumber, false otherwise.

JPiccola

In JPiccola, a boolean additionally provides the following bindings:

Classthis.getClass()Returns the class of this.