-
Notifications
You must be signed in to change notification settings - Fork 94
round
Ryzom Core Wiki edited this page Jul 8, 2024
·
3 revisions
title: Round description: published: true date: 2023-03-16T23:09:47.926Z tags: editor: markdown dateCreated: 2023-03-16T22:27:09.741Z
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.