gimpmath

Name

gimpmath -- Mathematical definitions and macros.

Synopsis



#define     G_MAXRAND
#define     RINT                            (x)
#define     ROUND                           (x)
#define     SQR                             (x)
#define     MAX255                          (a)
#define     CLAMP0255                       (a)
#define     gimp_deg_to_rad                 (angle)
#define     gimp_rad_to_deg                 (angle)

Description

Mathematical definitions and macros.

Details

G_MAXRAND

#define     G_MAXRAND


RINT()

#define     RINT(x)


ROUND()

#define ROUND(x) ((int) ((x) + 0.5))


SQR()

#define SQR(x) ((x) * (x))


MAX255()

#define MAX255(a)  ((a) | (((a) & 256) - (((a) & 256) >> 8)))


CLAMP0255()

#define CLAMP0255(a)  CLAMP(a,0,255)


gimp_deg_to_rad()

#define gimp_deg_to_rad(angle) ((angle) * (2.0 * G_PI) / 360.0)


gimp_rad_to_deg()

#define gimp_rad_to_deg(angle) ((angle) * 360.0 / (2.0 * G_PI))