Query: fixmul
OS: opendarwin
Section: 3alleg4
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
fixmul(3alleg4) Allegro manual fixmul(3alleg4)NAMEfixmul - Multiplies two fixed point values together. Allegro game programming library.SYNOPSIS#include <allegro.h> fixed fixmul(fixed x, fixed y);DESCRIPTIONA fixed point value can be multiplied or divided by an integer with the normal `*' and `/' operators. To multiply two fixed point values, though, you must use this function. If an overflow occurs, `errno' will be set and the maximum possible value will be returned, but `errno' is not cleared if the operation is successful. This means that if you are going to test for overflow you should set `errno=0' before calling fixmul(). Example: fixed result; /* This will put 30000 into `result'. */ result = fixmul(itofix(10), itofix(3000)); /* But this overflows, and sets `errno'. */ result = fixmul(itofix(100), itofix(3000)); ASSERT(!errno);RETURN VALUEReturns the clamped result of multiplying `x' by `y', setting `errno' to ERANGE if there was an overflow.SEE ALSOfixadd(3alleg4), fixsub(3alleg4), fixdiv(3alleg4), ex3buf(3alleg4), excustom(3alleg4), exfixed(3alleg4), exspline(3alleg4), exs- tars(3alleg4), exupdate(3alleg4) Allegro version 4.4.2 fixmul(3alleg4)
Related Man Pages |
---|
exspline(3alleg4) - centos |
exspline(3alleg4) - netbsd |
exspline(3alleg4) - minix |
exspline(3alleg4) - x11r4 |
exspline(3alleg4) - v7 |
Similar Topics in the Unix Linux Community |
---|
KSH arithmatic Integer overflow |
Performance Monitor |
Generate 100 Character Fixed Length Empty File |
need a command to search for numbers greater than 3000 |
awk count fields not working |