$truncate

$truncate

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

$truncate

Truncates a decimal number, making it an integer.

Syntax

$truncate(number)

Parameters

numbera number, or an expression that evaluates to a number

Return Value

Number, with no decimal places.

Example

$truncate(2.49)

Evaluates to 2.

$truncate(2.99)

Evaluates to 2.

int1 - $truncate(int1/int2) * int2

Performs int1 modulo int2. Can also be expressed as $modulus(int1,int2).

See Also

$modulus

$round

$tonumber

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese