C# Class SGDE.Content.Code.Library.Number

A data type representing an IEEE-754 double-precision floating-point number.
Inheritance: Object
ファイルを表示 Open project: sgdc/sgdc-old

Public Properties

Property Type Description
MAX_VALUE Number
MIN_VALUE Number
NEGATIVE_INFINITY Number
NaN Number
POSITIVE_INFINITY Number

Public Methods

Method Description
Number ( ) : System

Creates a Number object with the value of 0.

Number ( Object num = null ) : System

Creates a Number object with the specified value.

toExponential ( uint fractionDigits ) : String

Returns a string representation of the number in exponential notation.

toFixed ( uint fractionDigits ) : String

Returns a string representation of the number in fixed-point notation.

toLocaleString ( ) : String

Returns the local string representation of the specified Number object (myNumber).

toPrecision ( uint precision ) : String

Returns a string representation of the number either in exponential notation or in fixed-point notation.

toString ( ) : String

Returns the string representation of the specified Number object (myNumber).

toString ( Number radix ) : String

Returns the string representation of the specified Number object (myNumber).

Private Methods

Method Description
Number ( double d ) : System
forDigit ( int digit, int radix ) : char
toFormat ( char format, uint digits, uint offset ) : String
toString ( Number radix, bool local ) : String

Method Details

Number() public method

Creates a Number object with the value of 0.
public Number ( ) : System
return System

Number() public method

Creates a Number object with the specified value.
public Number ( Object num = null ) : System
num Object The numeric value of the Number instance being created or a value to be converted to a Number.
return System

toExponential() public method

Returns a string representation of the number in exponential notation.
public toExponential ( uint fractionDigits ) : String
fractionDigits uint An integer between 0 and 20, inclusive, that represents the desired number of decimal places.
return String

toFixed() public method

Returns a string representation of the number in fixed-point notation.
public toFixed ( uint fractionDigits ) : String
fractionDigits uint An integer between 0 and 20, inclusive, that represents the desired number of decimal places.
return String

toLocaleString() public method

Returns the local string representation of the specified Number object (myNumber).
public toLocaleString ( ) : String
return String

toPrecision() public method

Returns a string representation of the number either in exponential notation or in fixed-point notation.
public toPrecision ( uint precision ) : String
precision uint An integer between 1 and 21, inclusive, that represents the desired number of digits to represent in the resulting string.
return String

toString() public method

Returns the string representation of the specified Number object (myNumber).
public toString ( ) : String
return String

toString() public method

Returns the string representation of the specified Number object (myNumber).
public toString ( Number radix ) : String
radix Number Specifies the numeric base (from 2 to 36) to use for the number-to-string conversion. If you do not specify the radix parameter, the default value is 10.
return String

Property Details

MAX_VALUE public_oe static_oe property

The largest representable number (double-precision IEEE-754).
public static Number MAX_VALUE
return Number

MIN_VALUE public_oe static_oe property

The smallest representable non-negative, non-zero, number (double-precision IEEE-754).
public static Number MIN_VALUE
return Number

NEGATIVE_INFINITY public_oe static_oe property

Specifies the IEEE-754 value representing negative infinity.
public static Number NEGATIVE_INFINITY
return Number

NaN public_oe static_oe property

The IEEE-754 value representing Not a Number (NaN).
public static Number NaN
return Number

POSITIVE_INFINITY public_oe static_oe property

Specifies the IEEE-754 value representing positive infinity.
public static Number POSITIVE_INFINITY
return Number