C# Class clojure.lang.Ratio

Represents a rational number.
Inheritance: IComparable, IConvertible
ファイルを表示 Open project: arohner/clojure-contrib Class Usage Examples

Public Methods

Method Description
CompareTo ( object obj ) : int
Equals ( object obj ) : bool

Determines of an object is equal to this object.

GetHashCode ( ) : int

Gets a hash code for this.

GetTypeCode ( ) : TypeCode
Ratio ( BigInteger numerator, BigInteger denominator ) : System

Initialize a Ratio from num/denom.

ToBigDecimal ( ) : BigDecimal
ToBoolean ( IFormatProvider provider ) : bool
ToByte ( IFormatProvider provider ) : byte
ToChar ( IFormatProvider provider ) : char
ToDateTime ( IFormatProvider provider ) : System.DateTime
ToDecimal ( IFormatProvider provider ) : decimal
ToDouble ( IFormatProvider provider ) : double
ToInt16 ( IFormatProvider provider ) : short
ToInt32 ( IFormatProvider provider ) : int
ToInt64 ( IFormatProvider provider ) : long
ToSByte ( IFormatProvider provider ) : sbyte
ToSingle ( IFormatProvider provider ) : float
ToString ( ) : string

Returns a string representing the ratio.

ToString ( IFormatProvider provider ) : string
ToType ( Type conversionType, IFormatProvider provider ) : object
ToUInt16 ( IFormatProvider provider ) : ushort
ToUInt32 ( IFormatProvider provider ) : uint
ToUInt64 ( IFormatProvider provider ) : ulong

Method Details

CompareTo() public method

public CompareTo ( object obj ) : int
obj object
return int

Equals() public method

Determines of an object is equal to this object.
public Equals ( object obj ) : bool
obj object The object to compare to.
return bool

GetHashCode() public method

Gets a hash code for this.
public GetHashCode ( ) : int
return int

GetTypeCode() public method

public GetTypeCode ( ) : TypeCode
return TypeCode

Ratio() public method

Initialize a Ratio from num/denom.
public Ratio ( BigInteger numerator, BigInteger denominator ) : System
numerator BigInteger The numerator.
denominator BigInteger The denominator.
return System

ToBigDecimal() public method

public ToBigDecimal ( ) : BigDecimal
return BigDecimal

ToBoolean() public method

public ToBoolean ( IFormatProvider provider ) : bool
provider IFormatProvider
return bool

ToByte() public method

public ToByte ( IFormatProvider provider ) : byte
provider IFormatProvider
return byte

ToChar() public method

public ToChar ( IFormatProvider provider ) : char
provider IFormatProvider
return char

ToDateTime() public method

public ToDateTime ( IFormatProvider provider ) : System.DateTime
provider IFormatProvider
return System.DateTime

ToDecimal() public method

public ToDecimal ( IFormatProvider provider ) : decimal
provider IFormatProvider
return decimal

ToDouble() public method

public ToDouble ( IFormatProvider provider ) : double
provider IFormatProvider
return double

ToInt16() public method

public ToInt16 ( IFormatProvider provider ) : short
provider IFormatProvider
return short

ToInt32() public method

public ToInt32 ( IFormatProvider provider ) : int
provider IFormatProvider
return int

ToInt64() public method

public ToInt64 ( IFormatProvider provider ) : long
provider IFormatProvider
return long

ToSByte() public method

public ToSByte ( IFormatProvider provider ) : sbyte
provider IFormatProvider
return sbyte

ToSingle() public method

public ToSingle ( IFormatProvider provider ) : float
provider IFormatProvider
return float

ToString() public method

Returns a string representing the ratio.
public ToString ( ) : string
return string

ToString() public method

public ToString ( IFormatProvider provider ) : string
provider IFormatProvider
return string

ToType() public method

public ToType ( Type conversionType, IFormatProvider provider ) : object
conversionType System.Type
provider IFormatProvider
return object

ToUInt16() public method

public ToUInt16 ( IFormatProvider provider ) : ushort
provider IFormatProvider
return ushort

ToUInt32() public method

public ToUInt32 ( IFormatProvider provider ) : uint
provider IFormatProvider
return uint

ToUInt64() public method

public ToUInt64 ( IFormatProvider provider ) : ulong
provider IFormatProvider
return ulong