pntr
Image manipulation library
Math

Macros

#define PNTR_PI   3.1415926535897932f
 
#define PNTR_DEG2RAD   0.017453293f
 
#define PNTR_SINF   _pntr_sinf
 
#define PNTR_COSF   _pntr_cosf
 
#define PNTR_CEILF   _pntr_ceilf
 
#define PNTR_FABSF(a)   (((a) < 0) ? -(a) : (a))
 
#define PNTR_FLOORF(x)   (float)((int)x - ((x < 0.0f) ? 1 : 0))
 
#define PNTR_FMODF   _pntr_fmodf
 
#define PNTR_MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define PNTR_MIN(a, b)   ((a) < (b) ? (a) : (b))
 

Detailed Description

Macro Definition Documentation

◆ PNTR_CEILF

#define PNTR_CEILF   _pntr_ceilf

Computes the smallest integer value not less than arg.

Parameters
xFloating-point value
See also
https://en.cppreference.com/w/c/numeric/math/ceil

◆ PNTR_COSF

#define PNTR_COSF   _pntr_cosf

Calculates cosine of the given value.

Parameters
xFloating-point value representing angle in radians
See also
https://en.cppreference.com/w/c/numeric/math/cos
https://github.com/Immediate-Mode-UI/Nuklear/blob/master/nuklear.h

◆ PNTR_DEG2RAD

#define PNTR_DEG2RAD   0.017453293f

Convert a degree to radians. PI / 180.

float radians = degrees * PNTR_DEG2RAD
#define PNTR_DEG2RAD
Definition: pntr.h:1130

◆ PNTR_FABSF

#define PNTR_FABSF (   a)    (((a) < 0) ? -(a) : (a))

Computes the absolute value of a floating point value arg.

Parameters
aFloating point value
See also
https://en.cppreference.com/w/c/numeric/math/fabs

◆ PNTR_FLOORF

#define PNTR_FLOORF (   x)    (float)((int)x - ((x < 0.0f) ? 1 : 0))

Computes the largest integer value not greater than arg.

Parameters
xFloating point value.
See also
https://en.cppreference.com/w/c/numeric/math/floor

◆ PNTR_FMODF

#define PNTR_FMODF   _pntr_fmodf

Computes the floating-point remainder of the division operation x/y.

Parameters
dividendfloating point value
divisorfloating point value
See also
https://en.cppreference.com/w/c/numeric/math/fmod

◆ PNTR_MAX

#define PNTR_MAX (   a,
 
)    ((a) > (b) ? (a) : (b))

Return the largest value of the two given values.

Parameters
aThe first value to compare.
bThe second value to compare.
Returns
Which value is larger.

◆ PNTR_MIN

#define PNTR_MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Return the smallest value of the two given values.

Parameters
aThe first value to compare.
bThe second value to compare.
Returns
Which value is smaller.

◆ PNTR_PI

#define PNTR_PI   3.1415926535897932f

◆ PNTR_SINF

#define PNTR_SINF   _pntr_sinf

Calculates sine of the given value.

Parameters
xThe input value of sinf()
See also
https://en.cppreference.com/w/c/numeric/math/sin
https://github.com/Immediate-Mode-UI/Nuklear/blob/master/nuklear.h