ceil()

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

Examples

1
2
3
def setup():
    x = 2.88
    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: float) -> int

Parameters

  • value: float - number to round up

Updated on September 11, 2021 16:51:34pm UTC