ceil()#

Calculates the closest int value that is greater than or equal to the value of the parameter.

Examples#

1def setup():
2    x = 2.88
3    a = py5.ceil(x)  # Sets 'a' to 3

Description#

Calculates the closest int value that is greater than or equal to the value of the parameter.

This function makes a call to the numpy ceil() function.

Syntax#

ceil(value: Union[float, npt.ArrayLike]) -> Union[int, npt.NDArray]

Parameters#

  • value: Union[float, npt.ArrayLike] - number to round up

Updated on February 26, 2022 13:22:44pm UTC