Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

truncate

truncate( 
n_number 
) 
=> x_integer

Description

Truncates a given number to an integer.

Arguments

n_number

Any SKILL number.

Value Returned

x_integer

n_number truncated to an integer.

Examples

truncate( 1234.567)
=> 1234
round( 1234.567)
=> 1235
truncate( -1.7)
=> -1

Related Topics

ceiling

floor

round


Return to top
 ⠀
X