Mail Archives: djgpp/1997/02/05/05:47:07
|>
|> Basically you have to remember not to mix ints and fixed values in the
|> same statement, with a few exceptions:
|>
|> When adding, subtracting, and comparing, you must't mix values.
|>
|> You can multiply or divide a fixed by an int, and you will get a fixed
|> result.
|>
|> To multiply or divide two fixed values, you have to use the fmul() and
|> fdiv() functions.
|>
|> All this can be a big pain to keep track of - it's a _lot_ simpler to
|> use floats or the fix class in C++ :-)
|>
|> /*
|> * Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
|> * Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
|> */
Thanks for clearing this up, I just wasn't aware that the compiler doesn't keep
track like it does for the fix class in C++.
Chris.
- Raw text -