C#C
C#3y ago
Odin

❔ Truncate

how do I Truncate a float to an int, I tried this
public int maxGap = 4;


maxGap = 4 + decimal.Truncate(player.position.x/500);

and it says
Argument 1: cannot convert from 'float' to 'decimal' [Assembly-CSharp]

I really need to know how to truncate now
Was this page helpful?