round

taichi_glsl.scalar.round(x)

Find the nearest integer less than or equal to the parameter.

round returns a value equal to the nearest integer to x. The fraction 0.5 will round toward the larger integer. i.e. round(0.5) = 1.0.

Parameters

x – Specify the value to evaluate.

Returns

The return value is calculated as floor(x + 0.5).