vrchat-community / UdonSharp

A compiler for compiling C# to Udon assembly
https://udonsharp.docs.vrchat.com
MIT License
470 stars 50 forks source link

Fix negative float to integer truncation #79

Closed ureishi closed 1 year ago

ureishi commented 1 year ago

Change the method for casting floats to integers from Mathf.Floor to Math.Truncate. Same result as C# when casting a negative floating point number to an integer.