![]() |
![]() |
![]() |
Pigment 0.3 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <pgm/pgm.h> #define PGM_DEGREES_TO_RADIANS (theta) #define PGM_RADIANS_TO_DEGREES (theta) #define PGM_SINCOS (theta,s,c) #define PGM_FABSF (x) gint32 pgm_lrintf (gfloat x); enum PgmError;
Various functions used by Pigment for common tasks.
Last reviewed on 2009-05-07 (0.3.16)
#define PGM_DEGREES_TO_RADIANS(theta) ((theta) * (G_PI / 180.0f))
Converts from degrees to radians.
|
an angle in degrees. |
#define PGM_RADIANS_TO_DEGREES(theta) ((theta) * (180.0f / G_PI))
Converts from radians to degrees.
|
an angle in radians. |
#define PGM_SINCOS(theta,s,c)
Calculates sine and cosine of the angle theta
simultaneously.
|
a float representing an angle in radians. |
|
the address of the float where the sine value is going to be stored. |
|
the address of the float where the cosine value is going to be stored. |
#define PGM_FABSF(x)
Calculates the absolute value of float.
|
the floating-point number. |
gint32 pgm_lrintf (gfloat x);
Round x
to nearest integer using the current FPU rounding mode. On platforms
other than Windows where the C99 lrintf function is not available, the
function reverts to a float-to-int cast which uses the truncate FPU rounding
mode.
|
the input floating-point number. |
Returns : |
the rounded nearest integer. |