1
<!-- ##### SECTION Title ##### -->
4
<!-- ##### SECTION Short_Description ##### -->
5
Mathematical definitions and macros.
7
<!-- ##### SECTION Long_Description ##### -->
9
Mathematical definitions and macros. These macros should be used
10
rather than the ones from math.h for enhanced portability.
13
<!-- ##### SECTION See_Also ##### -->
18
<!-- ##### MACRO RINT ##### -->
20
This macro rounds its argument @x to an integer value in floating point
24
@x: the value to be rounded.
27
<!-- ##### MACRO ROUND ##### -->
29
This macro rounds its argument @x to the nearest integer.
32
@x: the value to be rounded.
35
<!-- ##### MACRO SQR ##### -->
37
This macro squares its argument @x.
40
@x: the value to be squared.
43
<!-- ##### MACRO MAX255 ##### -->
45
This macro limits it argument @a, an (0-511) int, to 255.
48
@a: the value to be limited.
51
<!-- ##### MACRO CLAMP0255 ##### -->
53
This macro clamps its argument @a, an int32-range int, between 0 and
57
@a: the value to be clamped.
60
<!-- ##### MACRO gimp_deg_to_rad ##### -->
62
This macro converts its argument @angle from degree to radian.
65
@angle: the angle to be converted.
68
<!-- ##### MACRO gimp_rad_to_deg ##### -->
70
This macro converts its argument @angle from radian to degree.
73
@angle: the angle to be converted.