Game Development Community

Floating point to integer

by Aygarp · in Technical Issues · 08/20/2006 (9:39 pm) · 1 replies

Heyy all, can anyone tell me ...how to convert floating point variables to integer in script????

#1
08/20/2006 (9:43 pm)
%myInt = mFloor(%myFloat + 0.5);

note - torquescript is typless. this is really just rounding a number to the nearest whole number.