trunc (Function)
Signature: trunc(x: float) -> float
Description: The integer part of x toward zero, as a float. Total.
Parameters
- x (
float): The float to truncate
Returns: float
Example
print(trunc(-2.7)) // -2.0
print (trunc -2.7) // -2.0
Signature: trunc(x: float) -> float
Description: The integer part of x toward zero, as a float. Total.
float): The float to truncateReturns: float
print(trunc(-2.7)) // -2.0
print (trunc -2.7) // -2.0