Real

Real

The standard type Real represents the mathematical concept of real. Note that Integer is a subclass of Real, so for each parameter of type Real, you can use an integer as the actual parameter. Real is itself an instance of the metatype PrimitiveType (from UML).

conformsTo OclComparable , OclSummable

Operations

=(object2 : OclSelf[?]) : Boolean[1] precedence: EQUALITY

Returns true if the numeric value of self is the same as the numeric value of object2, false otherwise.

<>(object2 : OclSelf[?]) : Boolean[1] precedence: EQUALITY

Returns true if the numeric value of self is the not the same as the numeric value of object2, false otherwise.

*(r : OclSelf[?]) : Real[1] precedence: MULTIPLICATIVE

The value of the multiplication of self and r.

+(r : OclSelf[?]) : Real[1] precedence: ADDITIVE

The value of the addition of self and r.

-() : Real[1] precedence: UNARY

The negative value of self.

-(r : OclSelf[?]) : Real[1] precedence: ADDITIVE

The value of the subtraction of r from self.

/(r : OclSelf[?]) : Real[1] invalidating precedence: MULTIPLICATIVE

The value of self divided by r. Evaluates to invalid if r is equal to zero.

abs() : Real[1]

The absolute value of self.

floor() : Integer[1]

The largest integer that is less than or equal to self.

max(r : OclSelf[?]) : Real[1]

The maximum of self and r.

min(r : OclSelf[?]) : Real[1]

The minimum of self and r.

round() : Integer[1]

The integer that is closest to self. When there are two such integers, the largest one.

toString() : String[1]

Converts self to a string value.