No clue if this will be useful to anyone...
Fixed Point Tools
Pretty simple, instructions are in the VC file, and it's got a lot of useful links to some forum posts on Fixed Point, that piece on trig functions, and links to V3 documentation. If you don't feel like testing it, there is some good reading in the VC file. ...I was a little too lazy, so I didn't make this an actual package or anything. Which, it probably doesn't need to be a full package.
int FIX_myvar1;
FIX_myvar1 = oF_Float2Fixed('2.5');
FIX_myvar1 = FIX_myvar1 + oF_Whole2Fixed(100); //Add 100.0
Log(LStrFixed(FIX_myvar1)); //log it.
PrintString(0, 0, screen, font, oF_Fixed2Str(FIX_myvar1, 4)); //display myvar1 with 4 decimal points of detail
FIX_myvar1 = FIX_myvar1 * 8; //Multiply it by 8
FIX_myvar1 = oF_multiFF(FIX_myvar1, oF_Float2Fixed('0.5')); //Multiply it by 0.5...
SetPixel(oF_Fixed2Int(FIX_myvar1), oF_Fixed2Int(FIX_myvar1), RGB(0, 0, 0)); //Convert myvar1 to integer; supports rounding
This probably doesn't really need explaining, but it can be good for conditionals too.
int FIX_v1 = oF_Float2Fixed('1.756');
if (FIX_v1 % FIXED_SCALE == oF_Float2Fixed('0.5')) { //If the decimal part of the number is equal to 0.5, say so.
Log('Halfway!');
}
while (FIX_v1 % FIXED_SCALE < oF_Float2Fixed('0.9') { //While the decimal part of the number is less than 0.9...
FIX_v1++; //Increment.
}