Category
OCL Number Operators
(Created page with "In addition to the basic math functions (+, -, /, \*) are a number of advanced functions. Take note that *Number* denotes both *Integer* and *Real*, and they're substitutive u...") |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
In addition to the basic math functions (+, -, /, \*) are a number of advanced functions. Take note that *Number* denotes both *Integer* and *Real*, and they're substitutive unless otherwise specified. | == Number Operators == | ||
In addition to the basic math functions (+, -, /, \*), there are a number of advanced functions. Take note that *Number* denotes both *Integer* and *Real*, and they're substitutive unless otherwise specified. | |||
{| class="wikitable" | |||
!Operators | |||
!Description | |||
|- | |||
|[[OCLOperators Number::abs () : Number|'''Number::abs () : Number''']] | |||
|Returns the absolute value of ''self'', ''self'' if it is already a positive number. | |||
|- | |||
|[[OCLOperators Number::floor () : Integer|'''Number::floor () : Integer''']] | |||
|Returns the integer part of self if it is a Real, self if it is an Integer. | |||
|- | |||
|[[OCLOperators Number::max ( r : Number ) : Number|'''Number::max ( r : Number ) : Number''']] | |||
|Returns the greatest number between self and *r*. | |||
|- | |||
|[[OCLOperators Number::min ( r : Number ) : Number|'''Number::min ( r : Number ) : Number''']] | |||
|Returns the lowest number between ''self'' and *r*. | |||
|- | |||
|[[OCLOperators Number::round () : Integer|'''Number::round () : Integer''']] | |||
|Returns the nearest integer to ''self'' if it is a Real, ''self'' if it is an Integer. | |||
|- | |||
|[https://wiki.mdriven.net/index.php/OCLOperators_Number::ieeereminder(r:Number):Integer '''Number::ieeereminder(r:Number):Integer'''] | |||
|Reminder of division with r, ie modulus or mod or % | |||
|- | |||
|[[OCLOperators Integer::div ( i : Integer ) : Integer|'''Integer::div ( i : Integer ) : Integer''']] | |||
|Returns the integer quotient of the division of ''self'' by *i*. | |||
|- | |||
|[[OCLOperators Integer::mod ( i : Integer ) : Integer|'''Integer::mod ( i : Integer ) : Integer''']] | |||
|Returns the integer remainder of the division of ''self'' by *i*. | |||
|} | |||
See also: https://wiki.mdriven.net/index.php/OCLOperators |
Latest revision as of 06:07, 8 May 2023
Number Operators
In addition to the basic math functions (+, -, /, \*), there are a number of advanced functions. Take note that *Number* denotes both *Integer* and *Real*, and they're substitutive unless otherwise specified.
Operators | Description |
---|---|
Number::abs () : Number | Returns the absolute value of self, self if it is already a positive number. |
Number::floor () : Integer | Returns the integer part of self if it is a Real, self if it is an Integer. |
Number::max ( r : Number ) : Number | Returns the greatest number between self and *r*. |
Number::min ( r : Number ) : Number | Returns the lowest number between self and *r*. |
Number::round () : Integer | Returns the nearest integer to self if it is a Real, self if it is an Integer. |
Number::ieeereminder(r:Number):Integer | Reminder of division with r, ie modulus or mod or % |
Integer::div ( i : Integer ) : Integer | Returns the integer quotient of the division of self by *i*. |
Integer::mod ( i : Integer ) : Integer | Returns the integer remainder of the division of self by *i*. |
This page was edited more than 1 years ago on 05/08/2023. What links here
Pages in category "OCL Number Operators"
The following 7 pages are in this category, out of 7 total.
O
- Documentation:OCLOperators Integer::div ( i : Integer ) : Integer
- Documentation:OCLOperators Integer::mod ( i : Integer ) : Integer
- Documentation:OCLOperators Number::abs () : Number
- Documentation:OCLOperators Number::floor () : Integer
- Documentation:OCLOperators Number::max ( r : Number ) : Number
- Documentation:OCLOperators Number::min ( r : Number ) : Number
- Documentation:OCLOperators Number::round () : Integer