SC2Mapster.com Wiki

FixedToInt

native int FixedToInt(fixed value);

Convert a fixed to an integer by flooring

Parameters

fixed value

Fixed value to convert

Return value

int - The fixed value converted to an integer. If there are decimals, it is floored (rounded to the lowest integer).

Examples

Example: Allowed conversion
int i;

i = FixedToInt(50.0);
// i = 50;

i = FixedToInt(10.5);
// i = 10; Because 10 <= 10.5

i = FixedToInt(-10.5);
// i = -11; Because -11 <= -10.5

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Mar 09, 2010
Last updated
Mar 09, 2010

Author