Blender V4.3
BLI_math_base_safe.h File Reference

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()

◆ safe_asinf()

◆ safe_divide()

◆ safe_inverse_sqrtf()

MINLINE float safe_inverse_sqrtf ( float a)

Definition at line 43 of file math_base_safe_inline.c.

References 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 )

Definition at line 20 of file math_base_safe_inline.c.

References b, and fmodf.

Referenced by TEST(), and blender::nodes::try_dispatch_float_math_fl_fl_to_fl().

◆ safe_powf()

MINLINE float safe_powf ( float base,
float exponent )

◆ safe_sqrtf()