Real Methods
The methods defined in the Real primitive type are summarized in the following table.
Method | Description |
---|---|
abs | Returns the absolute value of the receiver |
arccos | Returns the arc cosine of the receiver |
arcsin | Returns the arc sine of the receiver |
arctan | Returns the arc tangent of the receiver |
arcTan2 | Returns the arc tangent of a point (atan2 function) |
cos | Returns the cosine of the receiver |
currencyFormat | Returns a string in the currency format of the current locale |
display | Returns the receiver as a string |
exp | Returns the exponential e to the power of the receiver |
getFloatingPointClassification | Returns an integer indicating whether the receiver is a normal floating point value or a special value |
infinity | Sets the receiver to the special positive infinity value |
isInfinity | Returns true if the receiver has the special positive infinity value |
isNaN | Returns true if the receiver has the special not a number value |
log | Returns the natural logarithm of the receiver |
log10 | Returns the base 10 logarithm of the receiver |
max | Returns the larger value of the receiver and the specified Real |
min | Returns the lesser value of the receiver and the specified Real |
nan | Sets the receiver to the special not a number value |
numberFormat | Returns a string in the number format of the current locale |
parseCurrencyWithCurrentLocale | Sets the receiver to the result of parsing a string representing a currency value for the current locale |
parseCurrencyWithFmtAndLcid | Sets the receiver to the result of parsing a string representing a currency value for the specified format and the specified locale |
parseNumberWithCurrentLocale | Sets the receiver to the result of parsing a string representing a number for the current locale |
parseNumberWithFmtAndLcid | Sets the receiver to the result of parsing a string representing a number for the specified format and the specified locale |
rounded | Returns an integer containing the rounded value of the receiver |
rounded64 | Returns a 64-bit integer containing the rounded value of the receiver |
roundedTo | Returns the receiver rounded to the specified number of decimal places |
roundedUp | Returns an integer containing the value of the receiver rounded up to the nearest whole number |
roundedUp64 | Returns a 64-bit integer containing the value of the receiver rounded up to the nearest whole number |
setByteOrderLocal | Returns a Real that has the bytes ordered as required by the local node |
setByteOrderRemote | Returns a Real that has the bytes ordered as required by the specified remote node |
setFloatingPointClassification | Sets the receiver to a specified special value |
sin | Returns the sine of the receiver |
sqrt | Returns the square root of the receiver |
tan | Returns the tangent of the receiver |
truncated | Returns an integer containing the truncated value of the receiver |
truncated64 | Returns a 64-bit integer containing the truncated value of the receiver |
truncatedTo | Returns the receiver truncated to the specified number of decimal places |
userCurrencyFormat | Returns the receiver as a string in the specified currency format |
userCurrencyFormatAndLcid | Returns the receiver as a string in the specified currency format for the specified locale |
userNumberFormat | Returns the receiver as a string in the specified number format |
userNumberFormatAndLcid | Returns the receiver as a string in the specified number format for the specified locale |