OCL Number Operators
No edit summary
No edit summary
Tag: 2017 source edit
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Number Operators ==
===== 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.
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
'''See also''': [[Documentation:OCLOperators|OCLOperators]]

Latest revision as of 05:28, 10 March 2025

This page was created by Stephanie@mdriven.net on 2023-04-12. Last edited by Stephanie@mdriven.net on 2025-03-10.
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.

See also: OCLOperators