round - ryzom/ryzomcore GitHub Wiki
title: Round description: published: true date: 2023-03-12T17:40:38.581Z tags: editor: markdown dateCreated: 2023-03-12T17:40:34.751Z
The round native AI script function is used to round a float value to the closest integer value.
(value: f)round(value: f) // round_f_f
- value (float): The float value to be rounded.
-
rounded_value (float): The closest integer value to the input
value
.
(count)round(4.7); // returns 5
This example code calls the round
function with a float value of 4.7 and returns the closest integer value, which is 5.