We are using Visual Scripting package 1.7.6 with Unity 2021.3.1f1.
According to the 1.7 documentation for Formula, it says Round “rounds a value to the nearest integer or specified number of decimal places,” and provides an example of “round(3.222, 2)”.
However, attempting to use Formula to round 3.222 to 2 decimal places results in this error:
ArgumentException: round() takes at exactly 1 arguments. 2 provided.
If it’s using Mathf.Round (which only takes 1 argument and returns the nearest integer), the Formula documentation should be updated to reflect proper usage.
Thank you, I reported the issue. This is actually how the round should be used, with only 1 value and not 2. this will return 1. Note that 0.50 will return 0 as it is using this math function. Unity - Scripting API: Mathf.Round