Blender  V3.3
Functions
BLI_math_base_safe.h File Reference
#include "BLI_math_base.h"
#include "intern/math_base_safe_inline.c"

Go to the source code of this file.

Functions

MINLINE float safe_divide (float a, float b)
 
MINLINE float safe_modf (float a, float b)
 
MINLINE float safe_logf (float a, float base)
 
MINLINE float safe_sqrtf (float a)
 
MINLINE float safe_inverse_sqrtf (float a)
 
MINLINE float safe_asinf (float a)
 
MINLINE float safe_acosf (float a)
 
MINLINE float safe_powf (float base, float exponent)
 

Detailed Description

This file provides safe alternatives to common math functions like sqrt, powf. In this context "safe" means that the output is not NaN if the input is not NaN.

Definition in file BLI_math_base_safe.h.

Function Documentation

◆ safe_acosf()

MINLINE float safe_acosf ( float  a)

◆ safe_asinf()

MINLINE float safe_asinf ( float  a)

◆ safe_divide()

MINLINE float safe_divide ( float  a,
float  b 
)

Definition at line 13 of file math_base_safe_inline.c.

References Freestyle::a, and usdtokens::b().

Referenced by safe_logf(), and snap().

◆ safe_inverse_sqrtf()

MINLINE float safe_inverse_sqrtf ( float  a)

Definition at line 36 of file math_base_safe_inline.c.

References Freestyle::a, and sqrtf.

Referenced by blender::nodes::try_dispatch_float_math_fl_to_fl().

◆ safe_logf()

MINLINE float safe_logf ( float  a,
float  base 
)

◆ safe_modf()

MINLINE float safe_modf ( float  a,
float  b 
)

◆ safe_powf()

MINLINE float safe_powf ( float  base,
float  exponent 
)

◆ safe_sqrtf()

MINLINE float safe_sqrtf ( float  a)