floor()
Contents
floor()¶
Calculates the closest int value that is less than or equal to the value of the parameter.
Examples¶
1 2 3 | def setup():
x = 2.88
a = py5.floor(x) # Sets 'a' to 2
|
Description¶
Calculates the closest int value that is less than or equal to the value of the parameter.
This function makes a call to the numpy floor()
function.
Syntax¶
floor(value: Union[float, npt.ArrayLike]) -> Union[int, npt.NDArray]
Parameters¶
value: Union[float, npt.ArrayLike] - number to round down
Updated on February 26, 2022 13:22:44pm UTC