메소드 | 설명 | |
---|---|---|
Duplicate ( ) : |
The function replicates current Fraction object
|
|
Equals ( object obj ) : bool |
checks whether two fractions are equal
|
|
Fraction ( ) : System |
Constructor.
|
|
Fraction ( double decimalValue ) : System | ||
Fraction ( long wholeNumber ) : System |
Initializes a new instance of Fraction initialized to the specified whole-number value.
|
|
Fraction ( long numerator, long denominator ) : System | ||
Fraction ( string s ) : System | ||
GetHashCode ( ) : int |
returns a hash code for this fraction
|
|
Inverse ( |
The function returns the inverse of a Fraction object
|
|
ReduceFraction ( |
The function reduces(simplifies) a Fraction object by dividing both its numerator and denominator by their GCD
|
|
ToDouble ( ) : double |
The function returns the current Fraction object as double
|
|
ToFraction ( double dValue ) : |
The function takes a floating point number as an argument and returns its corresponding reduced fraction
|
|
ToFraction ( string strValue ) : |
The function takes an string as an argument and returns its corresponding reduced fraction the string can be an in the form of and integer, double or fraction. e.g it can be like "123" or "123.321" or "123/456"
|
|
ToString ( ) : string |
The function returns the current Fraction object as a string
|
|
operator ( ) : |
||
operator ( ) : bool |
메소드 | 설명 | |
---|---|---|
Add ( |
internal functions for binary operations
|
|
GreatestCommonDenominator ( long iNo1, long iNo2 ) : long |
The function returns GCD of two numbers (used for reducing a Fraction)
|
|
Initialize ( long numerator, long denominator ) : void |
Internal function for constructors
|
|
Multiply ( |
||
Negate ( |
internal function for negation
|
public Fraction ( long wholeNumber ) : System | ||
wholeNumber | long | Specifies the initial value of the fraction. |
리턴 | System |
public Fraction ( long numerator, long denominator ) : System | ||
numerator | long | |
denominator | long | |
리턴 | System |
public static ReduceFraction ( |
||
frac | ||
리턴 | void |
public static ToFraction ( double dValue ) : |
||
dValue | double | |
리턴 |
public static ToFraction ( string strValue ) : |
||
strValue | string | |
리턴 |