fixmul man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

fixmul(3)			Allegro manual			     fixmul(3)

NAME
       fixmul  - Multiplies two fixed point values together. Allegro game pro‐
       gramming library.

SYNOPSIS
       #include <allegro.h>

       fixed fixmul(fixed x, fixed y);

DESCRIPTION
       A 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 VALUE
       Returns	the  clamped result of multiplying `x' by `y', setting `errno'
       to ERANGE if there was an overflow.

SEE ALSO
       fixadd(3), fixsub(3), fixdiv(3),	 ex3buf(3),  excustom(3),  exfixed(3),
       exspline(3), exstars(3), exupdate(3)

Allegro				 version 4.4.2			     fixmul(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net