1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
<!-- ##### SECTION Title ##### -->
GimpMath
<!-- ##### SECTION Short_Description ##### -->
Mathematical definitions and macros.
<!-- ##### SECTION Long_Description ##### -->
<para>
Mathematical definitions and macros. These macros should be used
rather than the ones from math.h for enhanced portability.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### MACRO RINT ##### -->
<para>
This macro rounds its argument @x to an integer value in floating point
format.
</para>
@x: the value to be rounded.
<!-- ##### MACRO ROUND ##### -->
<para>
This macro rounds its argument @x to the nearest integer.
</para>
@x: the value to be rounded.
<!-- ##### MACRO SQR ##### -->
<para>
This macro squares its argument @x.
</para>
@x: the value to be squared.
<!-- ##### MACRO MAX255 ##### -->
<para>
This macro limits it argument @a, an (0-511) int, to 255.
</para>
@a: the value to be limited.
<!-- ##### MACRO CLAMP0255 ##### -->
<para>
This macro clamps its argument @a, an int32-range int, between 0 and
255 inclusive.
</para>
@a: the value to be clamped.
<!-- ##### MACRO gimp_deg_to_rad ##### -->
<para>
This macro converts its argument @angle from degree to radian.
</para>
@angle: the angle to be converted.
<!-- ##### MACRO gimp_rad_to_deg ##### -->
<para>
This macro converts its argument @angle from radian to degree.
</para>
@angle: the angle to be converted.
|