![]() |
MarketFactory C# API 3.0
|
A thin wrapper for a fixed-precision floating point number. More...
Public Member Functions | |
| MFFloat (string svalue) | |
| Constructor which accepts a string value. More... | |
| MFFloat (long value) | |
| Constructor which accepts a raw long value (integer offset by 10^9). More... | |
| MFFloat | add (MFFloat o) |
| Addition operator. More... | |
| int | CompareTo (Object o) |
| Implements Comparable method compareTo. More... | |
| override bool | Equals (System.Object obj) |
| int | fpart () |
| Return the fractional portion of the numerical value, as an integer which represents the number of billion'ths, without the sign. More... | |
| override int | GetHashCode () |
| bool | gt (MFFloat o) |
| Comparison operator: greater-than. More... | |
| bool | gte (MFFloat o) |
| Comparison operator: greater-than or equal. More... | |
| long | ipart () |
| Return the integer portion of the numerical value. More... | |
| bool | lt (MFFloat o) |
| Comparison operator: less-than. More... | |
| bool | lte (MFFloat o) |
| Comparison operator: less-than or equal. More... | |
| MFFloat | sub (MFFloat o) |
| Subtraction operator. More... | |
| double | toDouble () |
| Convert the value to a double. More... | |
| long | toLong () |
| Provide access to the raw long value. More... | |
| override string | ToString () |
| Convert the value to a human-readable string. More... | |
Static Public Member Functions | |
| static bool | isValid (MFFloat o) |
| Check if MFFloat object has valid value. More... | |
| static long | longValueOf (string s) |
| Returns a long value for the given string representation of a FP number. More... | |
| static bool | operator!= (MFFloat c1, MFFloat? c2) |
| static bool | operator== (MFFloat c1, MFFloat? c2) |
| static MFFloat | valueOf (string s) |
| Returns a MFFloat object for the given string representation of a FP number. More... | |
| static MFFloat | valueOf (double d, int precision) |
| Returns a MFFloat object for the given string representation of a FP number. More... | |
Static Public Attributes | |
| static MFFloat | NA = new MFFloat(-9223372036854775805L) |
| Special value: Not Applicable. More... | |
| static MFFloat | NDA = new MFFloat(-9223372036854775806L) |
| Special value: No Data Available. More... | |
| static MFFloat | NMA = new MFFloat(-9223372036854775807L) |
| Special value: No Market Available. More... | |
| static readonly MFFloat | NULL |
| static MFFloat | ZERO = new MFFloat(0) |
| Special value: Zero (as a convenience). More... | |
Properties | |
| bool | HasValue [get] |
A thin wrapper for a fixed-precision floating point number.
This class is immutable, you may not change the contents of the object. (All operations on it create a new object.)
| MFFloat | ( | string | svalue | ) |
Constructor which accepts a string value.
| MFFloat | ( | long | value | ) |
Constructor which accepts a raw long value (integer offset by 10^9).
|
static |
Returns a long value for the given string representation of a FP number.
This will throw an exception is the format is invalid.
|
static |
Returns a MFFloat object for the given string representation of a FP number.
|
static |
Returns a MFFloat object for the given string representation of a FP number.
| long toLong | ( | ) |
Provide access to the raw long value.
| double toDouble | ( | ) |
Convert the value to a double.
(Don't use this if you care about precision.)
| long ipart | ( | ) |
Return the integer portion of the numerical value.
| int fpart | ( | ) |
Return the fractional portion of the numerical value, as an integer which represents the number of billion'ths, without the sign.
| override string ToString | ( | ) |
Convert the value to a human-readable string.
| override bool Equals | ( | System.Object | obj | ) |
| override int GetHashCode | ( | ) |
| bool lte | ( | MFFloat | o | ) |
Comparison operator: less-than or equal.
| bool gte | ( | MFFloat | o | ) |
Comparison operator: greater-than or equal.
| bool lt | ( | MFFloat | o | ) |
Comparison operator: less-than.
| bool gt | ( | MFFloat | o | ) |
Comparison operator: greater-than.
Addition operator.
Will throw an exception if either of the objects is not valid.
Subtraction operator.
Will throw an exception if either of the objects is not valid.
| int CompareTo | ( | Object | o | ) |
Implements Comparable method compareTo.
|
static |
|
get |