From e42129241681dde7adae7d20697e7b421682fbb4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:23:22 +0200 Subject: Adding upstream version 2.10.22. Signed-off-by: Daniel Baumann --- .../libgimpmath/html/libgimpmath-GimpMath.html | 340 +++++++++++++++++++++ 1 file changed, 340 insertions(+) create mode 100644 devel-docs/libgimpmath/html/libgimpmath-GimpMath.html (limited to 'devel-docs/libgimpmath/html/libgimpmath-GimpMath.html') diff --git a/devel-docs/libgimpmath/html/libgimpmath-GimpMath.html b/devel-docs/libgimpmath/html/libgimpmath-GimpMath.html new file mode 100644 index 0000000..9dfde99 --- /dev/null +++ b/devel-docs/libgimpmath/html/libgimpmath-GimpMath.html @@ -0,0 +1,340 @@ + + + + +GimpMath: GIMP Math Library Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GimpMath

+

GimpMath — Mathematical definitions and macros.

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define +RINT() +
#define +ROUND() +
#define +SIGNED_ROUND() +
#define +SQR() +
#define +MAX255() +
#define +CLAMP0255() +
#define +SAFE_CLAMP() +
#define +gimp_deg_to_rad() +
#define +gimp_rad_to_deg() +
+
+
+

Description

+

Mathematical definitions and macros for use both by the GIMP +application and plug-ins. These macros should be used rather than +the ones from <math.h> for enhanced portability.

+
+
+

Functions

+
+

RINT()

+
#define RINT(x) rint(x)
+
+

This macro rounds its argument x + to an integer value in floating +point format. Use RINT() instead of rint().

+
+

Parameters

+
+++++ + + + + + +

x

the value to be rounded

 
+
+
+
+
+

ROUND()

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

This macro rounds its positive argument x + to the nearest integer.

+
+

Parameters

+
+++++ + + + + + +

x

the value to be rounded.

 
+
+
+
+
+

SIGNED_ROUND()

+
#define SIGNED_ROUND(x) ((int) RINT (x))
+
+

This macro rounds its argument x + to the nearest integer.

+
+

Parameters

+
+++++ + + + + + +

x

the value to be rounded.

 
+
+
+
+
+

SQR()

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

This macro squares its argument x +.

+
+

Parameters

+
+++++ + + + + + +

x

the value to be squared.

 
+
+
+
+
+

MAX255()

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

This macro limits it argument a +, an (0-511) int, to 255.

+
+

Parameters

+
+++++ + + + + + +

a

the value to be limited.

 
+
+
+
+
+

CLAMP0255()

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

This macro clamps its argument a +, an int32-range int, between 0 +and 255 inclusive.

+
+

Parameters

+
+++++ + + + + + +

a

the value to be clamped.

 
+
+
+
+
+

SAFE_CLAMP()

+
#define SAFE_CLAMP(x, low, high)  ((x) > (low) ? (x) < (high) ? (x) : (high) : (low))
+
+

Ensures that x + is between the limits set by low + and high +, +even if x + is NaN. If low + is greater than high +, or if either +of them is NaN, the result is undefined.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

x

the value to be limited.

 

low

the lower limit.

 

high

the upper limit.

 
+
+

Since: 2.10

+
+
+
+

gimp_deg_to_rad()

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

This macro converts its argument angle + from degree to radian.

+
+

Parameters

+
+++++ + + + + + +

angle

the angle to be converted.

 
+
+
+
+
+

gimp_rad_to_deg()

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

This macro converts its argument angle + from radian to degree.

+
+

Parameters

+
+++++ + + + + + +

angle

the angle to be converted.

 
+
+
+
+
+ + + \ No newline at end of file -- cgit v1.2.3