Project: Fractions
Unit: DelphiDabbler.Lib.Fractions
Record: TFraction
Applies to: ~>0.1
property Denominator: Int64;
This property provides the denominator of a fraction encapsulated by a TFraction.
The property is always strictly positive in the range 1..High(Int64).
var
F: TFraction;
begin
F := TFraction.Create(2, 3);
Assert(F.Denominator = 3); // F = 2/3
F := -F;
Assert(F.Denominator = -3); // F = -2/3
F := 0.75;
Assert(F.Denominator = 4); // F = 3/4
F := 42;
Assert(F.Denominator = 1); // F = 42/1
end;