Name
gimpmath -- Mathematical definitions and macros.
Description
Mathematical definitions and macros.
Details
G_PI
| #define G_PI    3.14159265358979323846 | 
G_PI_2
| #define G_PI_2  1.57079632679489661923 | 
G_PI_4
| #define G_PI_4  0.78539816339744830962 | 
G_SQRT2
| #define G_SQRT2 1.4142135623730951 | 
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)) |