gimp/devel-docs/libgimpmath/tmpl/gimpmath.sgml

76 lines
1.4 KiB
Plaintext

<!-- ##### 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>
<!-- ##### 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.