|
Blender V5.0
|
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 54 of file math_base_safe_inline.cc.
References acosf, ccl_device, CLAMP, clamp(), and MINLINE.
Referenced by angle_normalized_qt(), angle_signed_normalized_qt(), attr_create_pointiness(), basic_rotate(), bm_mesh_calc_uvs_sphere_face(), boid_body(), bsdf_diffuse_toon_eval(), bsdf_glossy_toon_eval(), bsdf_oren_nayar_G(), cache_key_incremental_rotation(), calc_bevel_sin_cos(), direction_to_fisheye_equisolid(), direction_to_fisheye_lens_polynomial(), direction_to_spherical(), do_guides(), dvar_eval_rotDiff(), effector_falloff(), fisheye_to_direction(), map_to_sphere(), mat3_to_quat_legacy(), merge(), modify_mesh(), pow_qt_fl_normalized(), blender::ed::curves::primitive_random_sphere(), proj_paint_state_cavity_init(), psys_thread_create_path(), Quaternion_angle_get(), quaternion_to_angles(), sky_angle_between(), svm_math(), svm_node_ies(), tri_to_quat_ex(), triangle_light_sample(), blender::nodes::try_dispatch_float_math_fl_to_fl(), vec_to_quat(), and Vector_angle().
Definition at line 48 of file math_base_safe_inline.cc.
References asinf, ccl_device, CLAMP, clamp(), and MINLINE.
Referenced by angle_normalized_v2v2(), angle_normalized_v3v3(), area_light_rect_sample(), bsdf_hair_chiang_eval(), bsdf_hair_chiang_sample(), bsdf_hair_reflection_sample(), quaternion_to_angles(), spherical_stereo_transform(), svm_math(), and blender::nodes::try_dispatch_float_math_fl_to_fl().
Definition at line 15 of file math_base_safe_inline.cc.
References b, ccl_device, and MINLINE.
Referenced by area_light_rect_sample(), bsdf_eval_pass_diffuse_weight(), bsdf_eval_pass_glossy_weight(), bsdf_hair_huang_albedo(), bsdf_microfacet_eval(), bsdf_microfacet_sample(), blender::nodes::node_shader_map_range_cc::build_float_linear(), blender::nodes::node_shader_map_range_cc::build_float_stepped(), BVHObjectBinning::BVHObjectBinning(), BVHSpatialSplit::BVHSpatialSplit(), d_gamma_d_h(), fisheye_to_direction(), fractal_voronoi_x_fx(), fresnel_conductor_polarized(), geometry_collide_offset(), gizmo_calc_rect_view_scale(), gizmo_spot_blend_prop_matrix_set(), hair_attenuation(), light_tree_emitter_importance(), light_tree_node_importance(), pdf_exponential_distribution(), relaxation_iteration_uv(), safe_logf(), safe_logf(), blender::nodes::node_shader_map_range_cc::sh_node_map_range_build_multi_function(), smootherstep(), snap(), svm_mapping(), svm_math(), svm_node_vector_map_range(), svm_vector_math(), transform_decompose(), trimmed_logistic(), blender::nodes::try_dispatch_float_math_fl3_fl3_to_fl3(), blender::nodes::try_dispatch_float_math_fl_fl_to_fl(), blender::ed::view3d::geometry_nodes_gizmos::LinearGizmo::update_transform(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_translate_transform_and_target_property(), and vfont_to_curve().
Definition at line 43 of file math_base_safe_inline.cc.
References MINLINE, and sqrtf.
Referenced by blender::nodes::try_dispatch_float_math_fl_to_fl().
Definition at line 30 of file math_base_safe_inline.cc.
References b, ccl_device, logf, MINLINE, safe_divide(), safe_divide(), and UNLIKELY.
Referenced by svm_math(), TEST(), and blender::nodes::try_dispatch_float_math_fl_fl_to_fl().
Definition at line 20 of file math_base_safe_inline.cc.
References b, fmodf, and MINLINE.
Referenced by TEST(), and blender::nodes::try_dispatch_float_math_fl_fl_to_fl().
Definition at line 60 of file math_base_safe_inline.cc.
References b, ccl_device, compatible_powf(), float_to_int(), MINLINE, powf, and UNLIKELY.
Referenced by safe_pow(), svm_math(), 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 38 of file math_base_safe_inline.cc.
References ccl_device_inline, max, max_ff(), MINLINE, sqrt, and sqrtf.
Referenced by blo_do_versions_300(), boid_body(), boid_brain(), bsdf_sheen_sample(), bssrdf_burley_sample(), cos_from_sin(), cos_theta(), disk_to_hemisphere(), ensure_valid_specular_reflection(), fresnel_dielectric_polarized(), guiding_record_surface_bounce(), light_tree_cos_bound_subtended_angle(), SkyMultipleScattering::lookup_multiscattering(), microfacet_ggx_sample_vndf(), mnee_sample_bsdf_dh(), phase_henyey_greenstein(), point_light_sample(), sample_cos_hemisphere(), blender::eevee::Sampling::sample_hemisphere(), blender::eevee::Sampling::sample_sphere(), sample_uniform_cone(), sample_uniform_hemisphere(), sin_from_cos(), sin_sqr_to_one_minus_cos(), solve_quadratic(), spot_light_sample(), svm_math(), and blender::nodes::try_dispatch_float_math_fl_to_fl().