TimeScale..::..GetRatioTo Method
Divides this instance by [divisor]. Division is made in BaseUnit
of the divisor. The remainder must be zero.
Namespace:
Suoranta.FinanceAssembly: Suoranta.Finance (in Suoranta.Finance.dll)
Syntax
public int GetRatioTo( ITimeScale divisor )
Parameters
- divisor
- Type: Suoranta.Finance..::..ITimeScale
The divisor.
Return Value
The integer quotient. FinanceException is thrown if the remainder is non-zero.Examples
C#
TimeScale oneHour = new (TimeUnit.Hour, 1, 24 * 60, 260); TimeScale fourHours = new (TimeUnit.Hour, 4, 24 * 60, 260); TimeScale one8hDay = new (TimeUnit.Day, 1, 8 * 60, 260); TimeScale one24hDay = new (TimeUnit.Day, 1, 24 * 60, 260); oneHour.GetRatioTo(fourHours); // throws an exception fourHours.GetRatioTo(oneHour); // returns 4 one24hDay.GetRatioTo(one8hDay); // returns 1

