Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PembulatanLease(AReal: Real): Int64;
- var
- base: Integer;
- begin
- if Pembulatan.Active then
- begin
- case Pembulatan.Kind of
- 1 : base := floor(AReal / Pembulatan.Amount);
- 2 : base := round(AReal / Pembulatan.Amount);
- 3 : base := ceil(AReal / Pembulatan.Amount);
- else base := 0;
- end;
- result := base * Pembulatan.Amount;
- end else
- result := trunc(AReal);
- end;
Advertisement