Floor, Ceiling function
Posted: 16 Jul 2014, 06:32
size=150Floor, Ceiling function/size
Version 5.2.16 and higher
The CEILING function is used to round a number upwards to the nearest multiple of a specified value.
The FLOOR function is used to round a number downwards to the nearest multiple of a specified value.
If you use Floor/Ceiling function with one parameter, second parameter is automatically used = 1.
ubSyntax:/b/u
double Result = Floor(double X);
double Result = Floor(double X, double Y);
double Result = Ceiling(double X);
double Result = Ceiling(double X, double Y);
See attached example for more info.
Version 5.2.16 and higher
The CEILING function is used to round a number upwards to the nearest multiple of a specified value.
The FLOOR function is used to round a number downwards to the nearest multiple of a specified value.
If you use Floor/Ceiling function with one parameter, second parameter is automatically used = 1.
ubSyntax:/b/u
double Result = Floor(double X);
double Result = Floor(double X, double Y);
double Result = Ceiling(double X);
double Result = Ceiling(double X, double Y);
See attached example for more info.