Instant properties: ceil

The instant property ceil represents the given float operand rounded to the next highest integer value.

Declaration

float float.ceil

Discussion

The instant property ceil returns a rounded value by calculating the next highest integer value of the operand in context of which the property is evaluated. Please note, the instant property ceil is read-only. The write access to this property is not allowed. For example:

var float f1 = 11.3; var float f2 = -5.3; var float result1 = f1.ceil; // result1 = 12.0 var float result2 = f2.ceil; // result2 = -5.0 // Write access is not allowed f1.ceil = 10.0; // Chora Compiler error

See also the built-in function math_ceil() as well as the cognate instant properties floor, round, trunc and fract.