|
Blender
V2.93
|
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) |
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.
Definition at line 61 of file math_base_safe_inline.c.
References Freestyle::a, acosf, clamp(), and CLAMP.
Referenced by attr_create_pointiness(), bsdf_diffuse_toon_eval_reflect(), bsdf_glossy_toon_eval_reflect(), direction_to_fisheye_equisolid(), direction_to_spherical(), fisheye_equisolid_to_direction(), fisheye_to_direction(), map_to_sphere(), rect_light_sample(), sky_angle_between(), svm_math(), svm_node_ies(), and blender::nodes::try_dispatch_float_math_fl_to_fl().
Definition at line 55 of file math_base_safe_inline.c.
References Freestyle::a, asinf, clamp(), and CLAMP.
Referenced by bsdf_hair_reflection_sample(), bsdf_principled_hair_eval(), bsdf_principled_hair_sample(), spherical_stereo_transform(), svm_math(), and blender::nodes::try_dispatch_float_math_fl_to_fl().
Definition at line 27 of file math_base_safe_inline.c.
References Freestyle::a.
Referenced by bump_shadowing_term(), MapRangeFunction::call(), MapRangeSteppedFunction::call(), MapRangeSmoothstepFunction::call(), MapRangeSmootherstepFunction::call(), hair_attenuation(), blender::nodes::map_linear(), blender::nodes::map_smootherstep(), blender::nodes::map_smoothstep(), blender::nodes::map_stepped(), safe_logf(), smootherstep(), snap(), svm_math(), svm_node_tex_voronoi(), trimmed_logistic(), blender::nodes::try_dispatch_float_math_fl3_fl3_to_fl3(), and blender::nodes::try_dispatch_float_math_fl_fl_to_fl().
Definition at line 50 of file math_base_safe_inline.c.
References Freestyle::a, and sqrtf.
Referenced by blender::nodes::try_dispatch_float_math_fl_to_fl().
Definition at line 37 of file math_base_safe_inline.c.
References Freestyle::a, logf, safe_divide(), and UNLIKELY.
Referenced by svm_math(), TEST(), and blender::nodes::try_dispatch_float_math_fl_fl_to_fl().
Definition at line 32 of file math_base_safe_inline.c.
References Freestyle::a, and fmodf.
Referenced by TEST(), blender::nodes::try_dispatch_float_math_fl3_fl3_to_fl3(), and blender::nodes::try_dispatch_float_math_fl_fl_to_fl().
Definition at line 67 of file math_base_safe_inline.c.
References Freestyle::a, compatible_powf(), float_to_int(), powf, and UNLIKELY.
Referenced by single_peaked_henyey_greenstein(), svm_math(), TEST(), and blender::nodes::try_dispatch_float_math_fl_fl_to_fl().
Definition at line 45 of file math_base_safe_inline.c.
References Freestyle::a, max(), MAX2, and sqrtf.
Referenced by beckmann_table_rows(), bsdf_beckmann_aniso_G1(), bsdf_beckmann_G1(), bsdf_microfacet_ggx_eval_reflect(), bsdf_microfacet_ggx_eval_transmit(), bsdf_microfacet_ggx_sample(), bssrdf_burley_sample(), bssrdf_cubic_sample(), bssrdf_gaussian_sample(), bssrdf_none_sample(), cos_from_sin(), direction_from_cosine(), ensure_valid_reflection(), henyey_greenstrein_sample(), kernel_volume_equiangular_pdf(), kernel_volume_equiangular_sample(), light_spread_attenuation(), mf_sample_phase_glass(), mf_sampleP22_11(), microfacet_ggx_sample_slopes(), microfacet_sample_stretched(), sample_uniform_cone(), shader_bsdf_average_roughness(), sky_radiance_nishita(), svm_math(), svm_node_closure_bsdf(), triangle_light_sample(), and blender::nodes::try_dispatch_float_math_fl_to_fl().