Alternativ das hier benutzen
Delphi-Quellcode:
procedure DivModEx(Dividend, Divisor: Integer; var Result, Remainder: Integer); overload;
begin
Result := Dividend div Divisor;
Remainder := Dividend mod Divisor;
end;
procedure DivModEx(Dividend, Divisor: Extended; var Result, Remainder: Extended); overload;
var Temp: Extended;
begin
Temp := Dividend / Divisor;
Result := Int(Temp);
Remainder := Frac(Temp) * Divisor;
end;