| |||||
Previous Next |
The Real type represents the mathematical concept of real. Note that Integer is a subtype of Real, so for each parameter of type Real, you can use an integer as the actual parameter. A real literal corresponds to: real::= (digit)+ ('.' (digit)+ (exp)? | exp) exp ::= ('e'|'E') ('+'|'-')? ('0'..'9')+ digit ::= '0'..'9'
Operation Summary | |
Real | + This real. |
Real | +(Real rhs) The vlue of the addition of this real and rhs. |
Real | /(Real rhs) The value of this real divided by rhs. |
Boolean | =(Real rhs) True if this real is equal to rhs. |
Boolean | >=(Real rhs) True if this real is greater than or equal to rhs. |
Boolean | >(Real rhs) True if this real is greater than rhs. |
Boolean | <=(Real rhs) True if this real is less than of equal to rhs. |
Boolean | <(Real rhs) True if this real is less than rhs. |
Real | *(Real rhs) The value of the multiplication of this real and rhs. |
Boolean | <>(Real rhs) True if this real is not equal to rhs. |
Real | - The opposite of this real. |
Real | -(Real rhs) The value of the substraction of rhs from this real. |
Real | abs The absolute value of this real. |
Integer | floor The largest integer which is less than or equal to this real. |
Real | max(Real rhs) The maximum of this real and rhs. |
Real | min(Real rhs) The minimum of this real and rhs. |
Real | random Static; a random generated real, between 0 and 1. |
Integer | round The integer which is closest to this real. |
String | toString A representative character string of this real. |
Operations inherited from type OclAny |
=, <>, oclAsType, oclIsKindOf, oclIsTypeOf |
Operations Detail |
public Boolean =(Real rhs)
public Boolean <>(Real rhs)
public Real +
public Real -
public Real +(Real rhs)
public Real -(Real rhs)
public Real *(Real rhs)
public Real /(Real rhs)
public Real abs
public Integer floor
public Integer round
public Real max(Real rhs)
public Real min(Real rhs)
public Boolean <(Real rhs)
public Boolean >(Real rhs)
public Boolean <=(Real rhs)
public Boolean >=(Real rhs)
public Real random
public String toString
| |||||
Previous Next |