C# Class UnitClassLibrary.Unit

Show file Open project: ParagonTruss/UnitClassLibrary Class Usage Examples

Public Methods

Method Description
ConversionFromThisTo ( IUnitType unit ) : double
Divide ( double divisor ) : Unit
IsNegative ( ) : bool
IsPositive ( ) : bool
MeasurementIn ( IUnitType unitType ) : Measurement
Multiply ( double scalar ) : Unit
ValueIn ( IUnitType unitType ) : double
operator ( ) : Unit
operator ( ) : bool

Protected Methods

Method Description
_HaveTheSameDimensions ( Unit unit1, Unit unit2 ) : bool
_ValuesAreEqual ( Unit unit1, Unit unit2 ) : bool

Method Details

ConversionFromThisTo() public method

public ConversionFromThisTo ( IUnitType unit ) : double
unit IUnitType
return double

Divide() public abstract method

public abstract Divide ( double divisor ) : Unit
divisor double
return Unit

IsNegative() public method

public IsNegative ( ) : bool
return bool

IsPositive() public method

public IsPositive ( ) : bool
return bool

MeasurementIn() public method

public MeasurementIn ( IUnitType unitType ) : Measurement
unitType IUnitType
return Measurement

Multiply() public abstract method

public abstract Multiply ( double scalar ) : Unit
scalar double
return Unit

ValueIn() public method

public ValueIn ( IUnitType unitType ) : double
unitType IUnitType
return double

_HaveTheSameDimensions() protected static method

protected static _HaveTheSameDimensions ( Unit unit1, Unit unit2 ) : bool
unit1 Unit
unit2 Unit
return bool

_ValuesAreEqual() protected static method

protected static _ValuesAreEqual ( Unit unit1, Unit unit2 ) : bool
unit1 Unit
unit2 Unit
return bool

operator() public static method

public static operator ( ) : Unit
return Unit

operator() public static method

public static operator ( ) : bool
return bool