|
Blender V4.5
|
#include <float.h>#include <limits.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include "BLI_assert.h"#include "BLI_math_inline.h"#include "BLI_sys_types.h"Go to the source code of this file.
Macros | |
| #define | __MATH_BASE_INLINE_C__ |
| #define | UNLIKELY(x) |
| #define | _round_clamp_fl_impl(arg, ty, min, max) |
| #define | _round_clamp_db_impl(arg, ty, min, max) |
| #define | _round_fl_impl(arg, ty) |
| #define | _round_db_impl(arg, ty) |
| #define | unit_float_to_uchar_clamp_v3(v1, v2) |
| #define | unit_float_to_uchar_clamp_v4(v1, v2) |
Functions | |
| MINLINE float | pow2f (float x) |
| MINLINE float | pow3f (float x) |
| MINLINE float | pow4f (float x) |
| MINLINE float | pow5f (float x) |
| MINLINE float | pow7f (float x) |
| MINLINE float | sqrt3f (float f) |
| MINLINE double | sqrt3d (double d) |
| MINLINE float | sqrtf_signed (float f) |
| MINLINE float | interpf (float target, float origin, float fac) |
| MINLINE double | interpd (double target, double origin, double fac) |
| MINLINE float | ratiof (float min, float max, float pos) |
| MINLINE double | ratiod (double min, double max, double pos) |
| MINLINE float | power_of_2 (float val) |
| MINLINE int | is_power_of_2_i (int n) |
| MINLINE int | power_of_2_max_i (int n) |
| MINLINE int | power_of_2_min_i (int n) |
| MINLINE unsigned int | power_of_2_max_u (unsigned int x) |
| MINLINE unsigned int | log2_floor_u (unsigned int x) |
| MINLINE unsigned int | log2_ceil_u (unsigned int x) |
| MINLINE unsigned char | round_fl_to_uchar (float a) |
| MINLINE short | round_fl_to_short (float a) |
| MINLINE int | round_fl_to_int (float a) |
| MINLINE unsigned int | round_fl_to_uint (float a) |
| MINLINE int | round_db_to_int (double a) |
| MINLINE unsigned char | round_fl_to_uchar_clamp (float a) |
| MINLINE int | round_fl_to_int_clamp (float a) |
| MINLINE unsigned char | round_db_to_uchar_clamp (double a) |
| MINLINE short | round_db_to_short_clamp (double a) |
| MINLINE int | round_db_to_int_clamp (double a) |
| MINLINE float | round_to_even (float f) |
| MINLINE int | divide_round_i (int a, int b) |
| MINLINE int | divide_floor_i (int a, int b) |
| MINLINE uint | divide_ceil_u (uint a, uint b) |
| MINLINE uint64_t | divide_ceil_ul (uint64_t a, uint64_t b) |
| MINLINE uint | ceil_to_multiple_u (uint a, uint b) |
| MINLINE uint64_t | ceil_to_multiple_ul (uint64_t a, uint64_t b) |
| MINLINE int | mod_i (int i, int n) |
| MINLINE float | floored_fmod (const float f, const float n) |
| MINLINE float | fractf (float a) |
| MINLINE float | wrapf (float value, float max, float min) |
| MINLINE float | pingpongf (float value, float scale) |
| MINLINE int | square_s (short a) |
| MINLINE int | square_i (int a) |
| MINLINE unsigned int | square_uint (unsigned int a) |
| MINLINE float | square_f (float a) |
| MINLINE int | cube_i (int a) |
| MINLINE float | cube_f (float a) |
| MINLINE float | min_ff (float a, float b) |
| MINLINE float | max_ff (float a, float b) |
| MINLINE float | smoothminf (float a, float b, float c) |
| MINLINE float | smoothstep (float edge0, float edge1, float x) |
| MINLINE double | min_dd (double a, double b) |
| MINLINE double | max_dd (double a, double b) |
| MINLINE int | min_ii (int a, int b) |
| MINLINE int | max_ii (int a, int b) |
| MINLINE uint | min_uu (uint a, uint b) |
| MINLINE uint | max_uu (uint a, uint b) |
| MINLINE unsigned long long | min_ulul (unsigned long long a, unsigned long long b) |
| MINLINE unsigned long long | max_ulul (unsigned long long a, unsigned long long b) |
| MINLINE double | max_ddd (double a, double b, double c) |
| MINLINE float | min_fff (float a, float b, float c) |
| MINLINE float | max_fff (float a, float b, float c) |
| MINLINE int | min_iii (int a, int b, int c) |
| MINLINE int | max_iii (int a, int b, int c) |
| MINLINE float | min_ffff (float a, float b, float c, float d) |
| MINLINE float | max_ffff (float a, float b, float c, float d) |
| MINLINE int | min_iiii (int a, int b, int c, int d) |
| MINLINE int | max_iiii (int a, int b, int c, int d) |
| MINLINE size_t | min_zz (size_t a, size_t b) |
| MINLINE size_t | max_zz (size_t a, size_t b) |
| MINLINE int | clamp_i (int value, int min, int max) |
| MINLINE float | clamp_f (float value, float min, float max) |
| MINLINE int | compare_ff (float a, float b, const float max_diff) |
| MINLINE uint | ulp_diff_ff (float a, float b) |
| MINLINE int | compare_ff_relative (float a, float b, const float max_diff, const int max_ulps) |
| MINLINE bool | compare_threshold_relative (const float value1, const float value2, const float thresh) |
| MINLINE float | increment_ulp (const float value) |
| MINLINE float | decrement_ulp (const float value) |
| MINLINE float | signf (float f) |
| MINLINE float | compatible_signf (float f) |
| MINLINE int | signum_i_ex (float a, float eps) |
| MINLINE int | signum_i (float a) |
| MINLINE int | integer_digits_f (const float f) |
| MINLINE int | integer_digits_d (const double d) |
| MINLINE int | integer_digits_i (const int i) |
| MINLINE unsigned char | unit_float_to_uchar_clamp (float val) |
| MINLINE unsigned short | unit_float_to_ushort_clamp (float val) |
| MINLINE unsigned char | unit_ushort_to_uchar (unsigned short val) |
| #define __MATH_BASE_INLINE_C__ |
Definition at line 10 of file math_base_inline.cc.
Definition at line 169 of file math_base_inline.cc.
Referenced by round_db_to_int_clamp(), round_db_to_short_clamp(), and round_db_to_uchar_clamp().
Definition at line 157 of file math_base_inline.cc.
Referenced by round_fl_to_int_clamp(), and round_fl_to_uchar_clamp().
| #define _round_db_impl | ( | arg, | |
| ty ) |
Definition at line 185 of file math_base_inline.cc.
Referenced by round_db_to_int().
| #define _round_fl_impl | ( | arg, | |
| ty ) |
Definition at line 181 of file math_base_inline.cc.
Referenced by round_fl_to_int(), round_fl_to_short(), round_fl_to_uchar(), and round_fl_to_uint().
| #define unit_float_to_uchar_clamp_v3 | ( | v1, | |
| v2 ) |
Definition at line 637 of file math_base_inline.cc.
Referenced by do_projectpaint_draw(), do_projectpaint_thread(), linearrgb_to_srgb_uchar3(), rgb_float_to_uchar(), and UI_GetThemeColorBlendShade3ubv().
| #define unit_float_to_uchar_clamp_v4 | ( | v1, | |
| v2 ) |
Definition at line 644 of file math_base_inline.cc.
Referenced by blender::ed::object::convert_float_color_to_byte_color(), linearrgb_to_srgb_uchar4(), and rgba_float_to_uchar().
| #define UNLIKELY | ( | x | ) |
Definition at line 26 of file math_base_inline.cc.
Returns a if it is a multiple of b or the next multiple or b after a.
Definition at line 244 of file math_base_inline.cc.
References b, divide_ceil_u(), and MINLINE.
Referenced by blender::gpu::GLImmediate::begin(), blender::gpu::MTLIndexBuf::bind_as_ssbo(), blender::gpu::MTLVertBuf::bind_as_ssbo(), blender::draw::View::compute_visibility(), blender::draw::select::SelectMap::end_sync(), blender::eevee::LightModule::end_sync(), blender::eevee::VelocityModule::end_sync(), blender::eevee::IrradianceBake::raylists_build(), blender::eevee::RayTraceModule::render(), blender::eevee::SubsurfaceModule::render(), and blender::draw::test_eevee_surfel_list().
Definition at line 249 of file math_base_inline.cc.
References b, divide_ceil_ul(), and MINLINE.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::gpu::GLIndexBuf::bind(), blender::gpu::GLVertBuf::bind(), blender::gpu::VKBuffer::create(), GPU_pixel_buffer_create(), blender::gpu::MTLTexture::init_internal(), and blender::gpu::MTLBuffer::MTLBuffer().
| MINLINE float clamp_f | ( | float | value, |
| float | min, | ||
| float | max ) |
Definition at line 445 of file math_base_inline.cc.
| MINLINE int clamp_i | ( | int | value, |
| int | min, | ||
| int | max ) |
Definition at line 440 of file math_base_inline.cc.
| MINLINE int compare_ff | ( | float | a, |
| float | b, | ||
| float | max_diff ) |
Almost-equal for IEEE floats, using absolute difference method.
| max_diff | the maximum absolute difference. |
Definition at line 456 of file math_base_inline.cc.
References b, fabsf, and MINLINE.
Referenced by aggregate_item_normal(), BKE_keyblock_add_ctime(), BM_lnorspace_err(), cloth_from_object(), compare_v2v2(), compare_v3v3(), compare_v4v4(), curvemap_make_table(), edbm_average_normals_exec(), blender::animrig::Action::has_single_frame(), nearly_parallel_normalized(), next_edgehalf_bev(), tri_corner_test(), blender::nodes::node_geo_transform_geometry_cc::use_translate(), and wm_gesture_straightline_do_angle_snap().
| MINLINE int compare_ff_relative | ( | float | a, |
| float | b, | ||
| float | max_diff, | ||
| int | max_ulps ) |
Almost-equal for IEEE floats, using their integer representation (mixing ULP and absolute difference methods).
| max_diff | is the maximum absolute difference (allows to take care of the near-zero area, where relative difference methods cannot really work). |
| max_ulps | is the 'maximum number of floats + 1' allowed between a and b to consider them equal. |
Definition at line 492 of file math_base_inline.cc.
References b, BLI_assert, fabsf, MINLINE, and ulp_diff_ff().
Referenced by blender::ed::object::apply_objects_internal(), BKE_bezier_array_merge(), compare_v2_classify(), fcurve_is_changed(), blender::geometry::is_larger(), mesh_calc_eigen_matrix(), blender::animrig::new_key_needed(), blender::tests::TEST(), blender::tests::TEST(), and vfont_to_curve().
| MINLINE bool compare_threshold_relative | ( | const float | value1, |
| const float | value2, | ||
| const float | thresh ) |
Definition at line 503 of file math_base_inline.cc.
References fabsf, and MINLINE.
Referenced by blender::bke::compare_geometry::values_different().
| MINLINE float compatible_signf | ( | float | f | ) |
Definition at line 570 of file math_base_inline.cc.
References MINLINE.
Referenced by svm_math(), svm_vector_math(), blender::nodes::try_dispatch_float_math_fl_to_fl(), and valuefn().
| MINLINE float cube_f | ( | float | a | ) |
Definition at line 313 of file math_base_inline.cc.
References MINLINE.
Referenced by ui_numedit_begin(), ui_numedit_but_SLI(), and widget_numslider().
| MINLINE int cube_i | ( | int | a | ) |
Definition at line 308 of file math_base_inline.cc.
References MINLINE.
Referenced by BKE_lightprobe_grid_cache_frame_sample_count().
| MINLINE float decrement_ulp | ( | float | value | ) |
Decrement the given float to the next representable floating point value in the negative direction.
Infinities and NaNs are left untouched. Subnormal numbers are handled correctly, as is zero (i.e. 0 and -0 are considered a single value, and progressing past zero continues on to the negative numbers).
Definition at line 540 of file math_base_inline.cc.
Integer division that returns the ceiling, instead of flooring like normal C division.
Definition at line 234 of file math_base_inline.cc.
Referenced by buffer_size_from_list(), ceil_to_multiple_u(), blender::draw::View::compute_visibility(), ED_fileselect_init_layout(), blender::draw::Manager::end_sync(), blender::eevee::LightModule::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::draw::extract_positions_subdiv(), blender::draw::command::DrawMultiBuf::generate_commands(), blender::eevee::VelocityModule::geometry_steps_fill(), blender::draw::get_dispatch_size(), blender::gpu::tests::gpu_shader_lib_test(), blender::eevee::Film::init(), blender::eevee::Sampling::init(), blender::eevee::ShadowModule::init(), blender::eevee::VolumeProbeModule::init(), blender::nodes::node_shader_ambient_occlusion_cc::node_shader_gpu_ambient_occlusion(), blender::eevee::IrradianceBake::raylists_build(), blender::draw::Manager::submit_debug(), blender::eevee::IrradianceBake::surfels_create(), blender::gpu::MTLTexture::update_sub(), blender::gpu::VKTexture::update_sub(), and blender::draw::View::visibility_word_per_draw().
Definition at line 239 of file math_base_inline.cc.
Referenced by ceil_to_multiple_ul(), blender::array_utils::compute_sum(), blender::seq::evict_caches_if_full(), and blender::eevee::ShadowModule::init().
| MINLINE int divide_floor_i | ( | int | a, |
| int | b ) |
Integer division that floors negative result.
Definition at line 227 of file math_base_inline.cc.
Referenced by blender::nodes::node_fn_integer_math_cc::get_multi_function().
| MINLINE int divide_round_i | ( | int | a, |
| int | b ) |
Integer division that rounds 0.5 up, particularly useful for color blending with integers, to avoid gradual darkening when rounding down.
Definition at line 218 of file math_base_inline.cc.
Referenced by blend_color_add_alpha_byte(), blend_color_add_byte(), blend_color_darken_byte(), blend_color_erase_alpha_byte(), blend_color_interpolate_byte(), blend_color_lighten_byte(), blend_color_mix_byte(), blend_color_mul_byte(), blend_color_sub_byte(), blender::color::ByteTraits::divide_round(), and IMB_rectblend().
| MINLINE float floored_fmod | ( | float | f, |
| float | n ) |
Floored modulo that is useful for wrapping numbers over n, including when f is negative.
This is the same as Python % or GLSL mod(): floored_fmod(-0.2, 1.0) = 0.8.
Definition at line 259 of file math_base_inline.cc.
References floorf, and MINLINE.
Referenced by blender::math::bilinear_fl_impl(), blender::math::interpolate_bilinear_wrap_byte(), blender::math::interpolate_nearest_wrap_byte(), blender::math::interpolate_nearest_wrap_fl(), blender::tests::TEST(), time_offset_fcurve_segment(), and blender::math::wrap_coord().
| MINLINE float fractf | ( | float | a | ) |
Definition at line 264 of file math_base_inline.cc.
References floorf, and MINLINE.
Referenced by blender::apply_color_factor(), pingpongf(), blender::RandomNumberGenerator::round_probabilistic(), sky_radiance_nishita(), blender::eevee::Sampling::step(), blender::SubFrame::SubFrame(), svm_node_hsv(), UI_view2d_dot_grid_draw(), and wm_gesture_straightline_do_angle_snap().
| MINLINE float increment_ulp | ( | float | value | ) |
Increment the given float to the next representable floating point value in the positive direction.
Infinities and NaNs are left untouched. Subnormal numbers are handled correctly, as is crossing zero (i.e. 0 and -0 are considered a single value, and progressing past zero continues on to the positive numbers).
Definition at line 515 of file math_base_inline.cc.
| MINLINE int integer_digits_d | ( | double | d | ) |
Returns number of (base ten) significant digits of integer part of given double (negative in case of decimal-only floats, 0.01 returns -1 e.g.).
Definition at line 608 of file math_base_inline.cc.
References fabs(), floor, and MINLINE.
Referenced by unit_as_string(), and unit_as_string_split_pair().
| MINLINE int integer_digits_f | ( | float | f | ) |
Returns number of (base ten) significant digits of integer part of given float (negative in case of decimal-only floats, 0.01 returns -1 e.g.).
Definition at line 603 of file math_base_inline.cc.
References fabs(), floor, and MINLINE.
Referenced by ui_but_string_get_ex().
| MINLINE int integer_digits_i | ( | const int | i | ) |
Definition at line 613 of file math_base_inline.cc.
Referenced by BKE_collection_new_name_get(), blender::io::usd::USDStageReader::create_proto_collections(), space_text_update_drawcache(), and stampdata().
| MINLINE double interpd | ( | double | target, |
| double | origin, | ||
| double | fac ) |
Definition at line 82 of file math_base_inline.cc.
References MINLINE.
Referenced by lineart_do_closest_segment(), lineart_intersect_seg_seg(), lineart_line_isec_2d_ignore_line2pos(), lineart_shadow_cast_onto_triangle(), lineart_shadow_register_silhouette(), lineart_shadow_segment_slice_get(), and blender::bke::tests::test_vec_roll_to_mat3_orthogonal().
| MINLINE float interpf | ( | float | target, |
| float | origin, | ||
| float | fac ) |
Definition at line 77 of file math_base_inline.cc.
References MINLINE.
Referenced by blender::ed::transform::applyCurveShrinkFatten(), blender::ed::transform::applyGPOpacity(), blender::ed::transform::applyMaskShrinkFatten(), BKE_curveprofile_evaluate_length_portion(), BKE_pchan_bbone_spline_compute(), blend_to_default_fcurve(), blend_to_neighbor_fcurve_segment(), bm_decim_edge_collapse(), bmo_vert_calc_edge_angle_blended(), breakdown_fcurve_segment(), butterworth_calculate_blend_value(), butterworth_smooth_fcurve_segment(), computeBindWeights(), create_samples_even_spacing(), data_transfer_interp_float_do(), draw_start_vertex_circle(), evaluate_time_fmodifiers(), evaluate_value_fmodifiers(), fcurve_eval_samples(), find_bbone_segment_index_curved(), imm_draw_circle_partial(), imm_draw_circle_partial_3d(), imm_draw_disk_partial(), imm_draw_disk_partial_3d(), blender::ed::vse::init_wave_table(), insert_bezt_to_nurb(), insert_bp_to_nurb(), interp_bpoint(), interp_slerp_co_no_v3(), lineart_chain_create_crossing_point(), lineart_shadow_edge_cut(), MOD_lineart_chain_feature_lines(), pose_slide_apply_val(), scale_average_fcurve_segment(), scale_from_fcurve_segment_neighbor(), smooth_fcurve_segment(), splineik_evaluate_bone(), stretchto_evaluate(), blender::ed::curves::stroke_elem_interp(), stroke_elem_interp(), subdivide_base(), subdividenurb(), uiAlignPanelStep(), update_timestep(), view3d_smoothview_apply_with_interp(), and weight_set_exec().
| MINLINE int is_power_of_2_i | ( | int | n | ) |
Definition at line 104 of file math_base_inline.cc.
References MINLINE.
Referenced by blf_batch_draw(), findBitIndex(), FlipDXTCImage(), get_profile_point(), IMB_create_gpu_texture(), log2_ceil_u(), blender::bke::mesh_calc_edges(), blender::bke::GeometrySet::operator<<, power_of_2_max_i(), and power_of_2_min_i().
Definition at line 147 of file math_base_inline.cc.
References is_power_of_2_i(), log2_floor_u(), MINLINE, and x.
Referenced by blender::draw::command::DrawMultiBuf::generate_commands(), and blender::tests::TEST().
Definition at line 142 of file math_base_inline.cc.
References log2_floor_u(), MINLINE, and x.
Referenced by log2_ceil_u(), log2_floor_u(), and blender::tests::TEST().
| MINLINE double max_dd | ( | double | a, |
| double | b ) |
Definition at line 358 of file math_base_inline.cc.
Referenced by max_ddd(), and blender::geometry::p_triangle_angles().
| MINLINE double max_ddd | ( | double | a, |
| double | b, | ||
| double | c ) |
Definition at line 390 of file math_base_inline.cc.
References b, max_dd(), and MINLINE.
Referenced by blender::geometry::p_chart_lscm_solve().
| MINLINE float max_ff | ( | float | a, |
| float | b ) |
Definition at line 324 of file math_base_inline.cc.
Referenced by alpha_circle_mask(), alpha_clip_aniso(), annotation_draw_stroke_2d(), annotation_draw_stroke_3d(), annotation_draw_stroke_buffer(), blender::seq::SubEffectOp::apply(), blender::seq::WhiteBalanceApplyOp::apply(), apply_heights_callback(), bake_ibuf_normalize_displacement(), barycentric_weights_v2_clamped(), blender::eevee::LightModule::begin_sync(), bezier_clamp(), bezier_handle_calc_smooth_fcurve(), BKE_bmbvh_overlap(), BKE_curvemapping_changed(), BKE_curvemapping_compute_range_dividers(), BKE_curvemapping_set_black_white_ex(), BKE_curvemapping_set_defaults(), BKE_curveprofile_move_point(), BKE_defvert_normalize_lock_map(), BKE_fcurves_calc_keyed_frames_ex(), BKE_gpencil_stroke_delete_tagged_points(), BKE_mask_spline_feather_resolution(), BKE_maskrasterize_handle_sample(), BKE_mesh_remap_calc_faces_from_mesh(), BKE_tracking_marker_clamp_search_size(), blend_color_burn_float(), blend_color_erase_alpha_float(), blend_color_lighten_float(), blend_color_linearburn_float(), blend_color_linearlight_float(), blend_color_pinlight_float(), blend_color_screen_float(), blend_color_sub_float(), blend_color_vividlight_float(), blf_glyph_to_curves(), BLI_box_pack_2d(), BLI_bvhtree_new(), blinn_specular(), blo_do_versions_300(), blo_do_versions_400(), block_align_proximity_compute(), BM_face_splits_check_legal(), blender::seq::brightcontrast_apply(), blender::ed::sculpt_paint::brush_dynamic_size_get(), brush_edit_apply(), button2d_geom_draw_backdrop(), calc_bbox(), calc_bevfac_mapping(), blender::ed::sculpt_paint::expand::calc_new_mask_mesh(), blender::ed::transform::calc_tw_center(), calculate_autoscale_factor(), calculate_bezt_bounds_y(), calculate_collision_balls(), calculate_fpt_bounds(), ccd_mesh_make(), ccd_mesh_update(), clamp_nonzero(), blender::ed::transform::clipUVData(), cloth_collision_response_static(), cloth_record_result(), cloth_selfcollision_response_static(), compute_bbone_segment_boundaries(), computeBindWeights(), blender::gpu::convert(), curvemap_make_table(), cylinder_project_exec(), damptrack_do_transform(), dist_signed_squared_to_corner_v3v3v3(), do_multires_bake(), do_versions_sequencer_speed_effect_recursive(), do_vert_pair(), draw_fcurve_curve(), draw_horizontal_scale_indicators(), blender::ed::vse::draw_seq_fcurve_overlay(), blender::ed::vse::draw_seq_text_overlay(), blender::ed::vse::draw_seq_waveform_overlay(), blender::ed::vse::draw_strip_icons(), blender::ed::transform::drawLine(), blender::ed::vse::drawmeta_contents(), drw_shgroup_bone_envelope(), dynamic_paint_effect_shrink_cb(), dynamic_paint_paint_particle_cell_point_cb_ex(), dynamic_paint_paint_single_point_cb_ex(), dynamicPaint_mixPaintColors(), ED_mask_draw_region(), ED_view3d_polygon_offset(), edbm_bevel_init(), edbm_bevel_modal(), edbm_inset_init(), edbm_inset_modal(), EDBM_preselect_edgering_draw(), expand_key_bounds(), fcurve_scene_coord_range_get(), find_last_key(), get_display_buffer_processor(), blender::animrig::get_frame_range_of_fcurves(), get_keyframe_extents(), blender::seq::give_frame_index(), blender::ed::transform::gizmo2d_xform_draw_prepare(), gizmo_bbone_offset_set(), GPU_line_width(), blender::nodes::node_shader_color_ramp_cc::gpu_shader_valtorgb(), gpu_texture_create_tile_array(), heat_set_H(), IDP_EqualsProperties_ex(), imagewraposa(), imagewraposa_aniso(), IMB_colormanagement_setup_glsl_draw_from_space(), blender::eevee::AmbientOcclusion::init(), blender::workbench::CavityEffect::init(), interp_weights_poly_v2(), interp_weights_poly_v3(), isect_seg_seg_v2_point_ex(), blender::ed::vse::label_rect_get(), blender::ed::vse::label_rect_init(), layer_bucket_init(), blender::bke::greasepencil::convert::legacy_gpencil_frame_to_grease_pencil_drawing(), blender::bke::pbvh::long_edge_queue_edge_add_recursive(), loopcut_modal(), make_box_union(), blender::color::FloatTraits::max(), max_fff(), max_ffff(), max_v3_v3v3(), meshdeform_ray_tree_intersect(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modify_mesh(), move_segment(), blender::ed::transform::nearest_world_tree(), blender::nodes::node_composite_color_ramp_cc::node_gpu_material(), blender::ed::space_node::node_update_hidden(), blender::ed::space_node::nodelink_get_draw_config(), blender::ed::object::object_rand_transverts(), blender::draw::overlay::Lights::object_sync(), blender::ed::object::object_warp_transverts_minmax_x(), offset_meet(), blender::eevee::Film::overscan_pixels_get(), blender::geometry::pack_islands_alpaca_rotate(), blender::geometry::pack_islands_alpaca_turbo(), blender::geometry::pack_islands_optimal_pack(), blender::ed::sculpt_paint::paint_cursor_context_init(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), blender::ed::sculpt_paint::paint_stroke_overlapped_curve(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step(), polyedge_beauty_cost_update_single(), blender::draw::View::OffsetData::polygon_offset_factor(), py_bvhtree_overlap(), quad_calc_error(), radial_control_invoke(), ramp_blend(), RE_GetWindowMatrixWithOverscan(), blender::io::usd::USDCameraReader::read_object_data(), blender::io::alembic::AbcCameraReader::readObjectData(), recalc_face_normals_find_index(), blender::eevee::DepthOfField::render(), blender::seq::retiming_transition_key_frame_set(), rgb_to_cpack(), RNA_property_float_ui_range(), safe_sqrtf(), blender::gpu::MTLContext::sampler_state_cache_init(), scan_for_ext_face_forces(), blender::ed::sculpt_paint::expand::sculpt_expand_modal(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::ed::vse::sequencer_main_clamp_view(), blender::ed::vse::sequencer_retiming_draw_continuity(), SimpleDeformModifier_do(), slider_update_factor(), smart_uv_project_calculate_project_normals(), smooth_view_rect_to_fac(), smoothminf(), snap_to_superellipsoid(), softbody_apply_forces(), softbody_step(), sphclassical_calc_dens(), sphere_project_exec(), splineik_evaluate_bone(), square_roughness_node_insert(), blender::draw::statvis_calc_distort(), blender::draw::statvis_calc_sharp(), stitch_island_calculate_edge_rotation(), stitch_island_calculate_vert_rotation(), stretchto_evaluate(), blender::ed::vse::strip_draw_context_get(), svd_m4(), blender::eevee::DepthOfField::sync(), blender::gpu::tests::texture_create_upload_read_with_bias(), texture_value_blend(), tracking_check_marker_margin(), blender::ed::transform::transformEvent(), ui_block_bounds_calc(), ui_block_bounds_calc_text(), ui_but_range_set_soft(), ui_do_but_NUM(), ui_draw_but_CURVE(), ui_draw_but_CURVEPROFILE(), ui_draw_dropshadow(), ui_menu_scroll_apply_offset_y(), ui_numedit_begin(), ui_numedit_but_NUM(), ui_popup_block_position(), ui_popup_block_refresh(), ui_tooltip_create_with_data(), blender::ed::sculpt_paint::update_curve_mask(), blender::ed::sculpt_paint::expand::update_mask_bmesh(), blender::ed::sculpt_paint::expand::update_mask_grids(), blender::draw::overlay::Resources::update_theme_settings(), blender::bke::pbvh::uv_islands::UVBorderCorner::uv(), uv_cylinder_project(), uv_map_mirror(), uv_sphere_project(), v3d_cursor_plane_draw(), vertex_color_brightness_contrast_exec(), blender::draw::overlay::Resources::vertex_size_get(), vertex_sort(), vfont_to_curve(), blender::ed::object::vgroup_normalize(), view3d_orbit_apply_dyn_ofs_ortho_correction(), view3d_zoom_border_exec(), blender::ed::space_node::viewer_border_exec(), viewzoom_scale_value(), blender::ed::object::voxel_size_edit_invoke(), blender::ed::object::voxel_size_edit_modal(), walkEvent(), widget_scroll(), WIDGETGROUP_empty_image_refresh(), blender::draw::View::OffsetData::winmat_polygon_offset(), wm_software_cursor_draw_crosshair(), WM_window_set_dpi(), wrapped_lighting(), and zspan_scanconvert().
| MINLINE float max_fff | ( | float | a, |
| float | b, | ||
| float | c ) |
Definition at line 399 of file math_base_inline.cc.
References b, max_ff(), and MINLINE.
Referenced by blender::ed::object::apply_objects_internal(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), calculate_bezt_bounds_x(), calculate_bezt_bounds_y(), clamp_axis_max_v3(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::compute_scale(), cube_project_exec(), blender::bke::pbvh::pixels::do_encode_pixels(), dynamicPaint_prepareEffectStep(), fast_ray_nearest_hit(), getSurfaceDimension(), imagewrap(), imagewraposa(), imagewraposa_aniso(), mat4_to_size_max_axis(), max_ffff(), position_tail_on_spline(), blender::bke::pbvh::raycast_node_detail_bmesh(), rgb_to_hsl(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), blender::geometry::signed_distance_fat_triangle(), surfaceGenerateGrid(), blender::geometry::Occupancy::trace_triangle(), view3d_from_minmax(), and view3d_localview_init().
| MINLINE float max_ffff | ( | float | a, |
| float | b, | ||
| float | c, | ||
| float | d ) |
Definition at line 417 of file math_base_inline.cc.
References b, max_ff(), max_fff(), and MINLINE.
Referenced by calculate_bezt_draw_resolution(), expand_key_bounds(), and blender::ed::space_node::node_link_draw_is_visible().
| MINLINE int max_ii | ( | int | a, |
| int | b ) |
Definition at line 367 of file math_base_inline.cc.
Referenced by accessor_get_ibuf(), blender::eevee::GBuffer::acquire(), action_space_icon_get(), action_space_name_get(), actionzone_modal(), blender::gpu::MTLFrameBuffer::add_color_attachment(), blender::gpu::MTLFrameBuffer::add_depth_attachment(), blender::gpu::MTLShaderInterface::add_input_attribute(), blender::gpu::MTLFrameBuffer::add_stencil_attachment(), blender::gpu::MTLShaderInterface::add_storage_block(), blender::gpu::MTLShaderInterface::add_texture(), blender::gpu::MTLShaderInterface::add_uniform_block(), blender::bke::pbvh::uv_islands::add_uv_island(), blender::draw::alloc_final_points_vbo(), animviz_calc_motionpaths(), annotation_draw_eraser(), blender::seq::SubEffectOp::apply(), area_move_set_limits(), attr_align(), azone_clipped_rect_calc(), blender::gpu::MTLShader::bake_pipeline_state(), blender::ed::space_node::best_socket_input(), bevel_build_cutoff(), blender::gpu::VKVertexAttributeObject::bind(), BKE_autotrack_context_sync(), BKE_curve_material_index_validate(), BKE_icon_geom_rasterize(), BKE_image_get_tile_info(), BKE_mask_get_duration(), BKE_mask_spline_resolution(), BKE_mesh_remap_calc_faces_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_validate_material_indices(), BKE_nurb_order_clamp_u(), BKE_nurb_order_clamp_v(), BKE_render_num_threads(), BKE_sculpt_mask_layers_ensure(), BKE_tracking_get_plane_imbuf(), BKE_tracking_reconstruction_context_new(), BKE_tracking_tracks_first_last_frame_minmax(), blend_color_burn_byte(), blend_color_erase_alpha_byte(), blend_color_lighten_byte(), blend_color_linearburn_byte(), blend_color_linearlight_byte(), blend_color_pinlight_byte(), blend_color_screen_byte(), blend_color_sub_byte(), blend_color_vividlight_byte(), blend_file_thumb_clamp_size(), BLI_bitmap_draw_2d_poly_v2i_n(), BLI_bvhtree_find_nearest_projected(), BLI_ghash_calc_quality_ex(), BLI_rcti_do_minmax_rcti(), blo_do_versions_410(), blo_do_versions_420(), bm_edgering_pair_subdiv(), BM_mesh_bevel(), BM_mesh_decimate_dissolve_ex(), BM_mesh_partial_create_from_verts_group_multi(), BM_mesh_partial_create_from_verts_group_single(), bmo_create_grid_exec(), bmo_unsubdivide_exec(), brush_scale_size_exec(), calculate_autoscale_factor(), blender::bke::pbvh::pixels::CopyPixelCommand::can_be_extended(), blender::gpu::VKBackend::capabilities_init(), change_spacing_exec(), channels_bake_exec(), circle_select_exec(), clamp_i(), clip_set_scene_frames_exec(), blender::eevee::DeferredPipeline::closure_layer_count(), cloth_record_result(), blender::gpu::VKFrameBuffer::color_attachments_resource_size(), colorband_init_from_table_rgba_simple(), blender::gpu::MTLContext::compute_dispatch(), blender::draw::View::compute_visibility(), console_select_to_buffer(), cp_cu_key(), blender::seq::create_missing_media_image(), create_primitive_from_points(), blender::ed::transform::createTransSeqData(), curve_decimate_exec(), curvemap_buttons_layout(), curvemap_make_table(), CurveProfile_buttons_layout(), blender::ed::vse::displayed_channel_range_get(), dopesheet_view_all_exec(), blender::workbench::DofPass::draw(), blender::ed::space_node::draw_background_color(), draw_current_frame(), blender::ed::vse::draw_seq_fcurve_overlay(), blender::ed::vse::draw_seq_timeline_channels(), draw_spline_curve(), draw_text_main(), blender::ed::vse::drawmeta_contents(), blender::ed::object::drop_named_material_invoke(), blender::ed::object::drop_named_material_tooltip(), ED_curve_editfont_select_pick(), ED_info_draw_stats(), ed_preview_draw_rect(), ED_region_image_overlay_info_text_draw(), ED_scene_fps_average_accumulate(), ED_view3d_backbuf_sample_size_clamp(), ED_view3d_depth_read_cached(), ED_view3d_update_viewmat(), blender::gpu::MTLImmediate::end(), blender::eevee::LightModule::end_sync(), blender::gpu::MTLContext::ensure_render_pipeline_state(), fcurve_scene_coord_range_get(), file_smoothscroll_invoke(), filelist_file_cache_block(), blender::bke::pbvh::pixels::Rows::find_second_source(), blender::eevee::VelocityModule::geometry_steps_fill(), gesture_box_apply_rect(), get_active_fcurve_keyframe_edit(), blender::get_factor_from_index(), blender::ed::space_node::get_main_socket(), blender::gpu::VKQueryPool::get_occlusion_result(), blender::gpu::GLPixelBuffer::GLPixelBuffer(), blender::gpu::GLShaderInterface::GLShaderInterface(), GPU_offscreen_create(), gpu_texture_create_tile_array(), gpu_texture_update_from_ibuf(), blender::ed::sculpt_paint::grease_pencil_eraser_draw(), blender::eevee::DeferredPipeline::header_layer_count(), image_sample_apply(), image_view_all(), IMB_create_gpu_texture(), implicit_needed_branches(), blender::eevee::Film::init(), blender::eevee::MotionBlurModule::init(), blender::eevee::Sampling::init(), blender::eevee::Sampling::init(), blender::workbench::DofPass::init(), blender::workbench::SceneState::init(), blender::gpu::Texture::init_2D(), blender::gpu::Texture::init_cubemap(), blender::ed::transform::initSnapping(), blender::ed::vse::left_fake_key_frame_get(), blender::bke::image::partial_update::PartialUpdateRegisterImpl::limit_history(), M_Geometry_interpolate_bezier(), blender::bke::image::partial_update::TileChangeset::mark_region(), blender::eevee::SphereProbeAtlasCoord::LocationFinder::mark_space_used(), blender::bke::pbvh::uv_islands::mask_resolution_from_tile_resolution(), blender::eevee::DeferredLayer::material_add(), blender::eevee::DeferredProbePipeline::material_add(), blender::eevee::PlanarProbePipeline::material_add(), Matrix_str(), blender::color::ByteTraits::max(), max_iii(), max_iiii(), mesh_join_offset_face_sets_ID(), blender::gpu::Texture::mip_depth_get(), blender::gpu::Texture::mip_height_get(), blender::gpu::Texture::mip_size_get(), blender::gpu::Texture::mip_width_get(), MOD_lineart_gpencil_generate_v3(), MOD_meshcache_calc_range(), motionpath_calculate_update_range(), motionpath_get_global_framerange(), blender::gpu::name_buffer_copystr(), blender::ed::space_node::node_socket_calculate_height(), blender::eevee::DeferredPipeline::normal_layer_count(), ZstdWriteWrap::open(), blender::ed::outliner::outliner_data_api_buttons_start_x(), panel_calculate_size_recursive(), blender::draw::particle_batch_cache_ensure_procedural_final_points(), paste_get_y_offset(), pipe_adj_vmesh(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), blender::ed::space_node::preview_prepare_scene(), preview_prepare_scene(), uiLayout::prop(), psys_get_pointcache_start_end(), psys_thread_context_init_path(), blender::gpu::VKPushConstants::push_constant_set(), pygpu_texture__tp_new(), radial_control_invoke(), blender::ed::sculpt_paint::face_set::randomize_colors_exec(), blender::gpu::MTLTexture::read(), blender::gpu::VKFrameBuffer::read(), blender::ed::vse::realize_fake_keys_in_rect(), blender::gpu::FrameBuffer::recursive_downsample(), region_rect_recursive(), blender::eevee::RayTraceModule::render(), blender::seq::render_give_ibuf(), blender::gpu::VKFrameBuffer::rendering_ensure_dynamic_rendering(), blender::gpu::VKFrameBuffer::rendering_ensure_render_pass(), RNA_property_int_ui_range(), blender::ed::sculpt_paint::expand::sculpt_expand_modal(), seq_update_meta_disp_range(), blender::ed::vse::seq_view_collection_rect_timeline(), blender::ed::vse::sequencer_add_effect_strip_exec(), blender::seq::sequencer_all_free_anim_ibufs(), blender::ed::vse::sequencer_drop_copy(), blender::ed::vse::sequencer_export_subtitles_exec(), blender::ed::vse::sequencer_image_seq_get_minmax_frame(), blender::ed::vse::sequencer_meta_make_exec(), blender::ed::vse::sequencer_select_side_exec(), blender::ed::vse::sequencer_set_range_to_strips_exec(), blender::ed::vse::sequencer_visible_strips_get(), set_profile_spacing(), blender::seq::shuffle_strip_time_offset_get(), SIM_hair_volume_add_segment(), blender::seq::strip_time_effect_range_set(), blender::seq::strip_update_sound_bounds_recursive_impl(), svd_m4(), blender::eevee::RayTraceModule::sync(), blender::ed::asset::take_screenshot_crop(), blender::draw::TestDefrag::TestDefrag(), text_scroll_state_init(), textview_draw_sel(), blender::seq::time_update_meta_strip_range(), tracking_dopesheet_calc_coverage(), tracking_dopesheet_channels_segments_calc(), blender::seq::transform_seqbase_shuffle_ex(), ui_do_but_NUM(), ui_item_rna_size(), ui_litem_estimate_column_flow(), ui_litem_estimate_grid_flow(), ui_litem_grid_flow_compute(), ui_litem_layout_absolute(), ui_litem_layout_radial(), UI_panel_category_draw_all(), ui_panels_size(), ui_text_clip_cursor(), ui_text_clip_middle(), ui_text_clip_middle_protect_right(), ui_text_clip_right_label(), ui_tooltip_create_with_data(), uilist_prepare(), uiTemplateReportsBanner(), uiTemplateStatusInfo(), unit_as_string_split_pair(), blender::gpu::VKTexture::update_sub(), vfont_to_curve(), view2d_masks(), widget_draw_text(), widget_scroll(), wm_main_playanim_intern(), WM_window_set_dpi(), and zspan_scanconvert().
| MINLINE int max_iii | ( | int | a, |
| int | b, | ||
| int | c ) |
Definition at line 408 of file math_base_inline.cc.
References b, max_ii(), and MINLINE.
Referenced by blo_do_versions_260(), blo_do_versions_420(), blender::gpu::Texture::init_3D(), max_iiii(), and blender::ed::vse::thumb_calc_first_timeline_frame().
| MINLINE int max_iiii | ( | int | a, |
| int | b, | ||
| int | c, | ||
| int | d ) |
Definition at line 426 of file math_base_inline.cc.
References b, max_ii(), max_iii(), and MINLINE.
Referenced by _bli_array_iter_spiral_square().
Definition at line 385 of file math_base_inline.cc.
Referenced by blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::gpu::MTLVertBuf::bind(), blender::gpu::VKBuffer::create(), blender::gpu::VKBuffer::flush(), blender::gpu::new_buffer_size(), and blender::gpu::MTLTexture::update_sub().
Definition at line 376 of file math_base_inline.cc.
Referenced by blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::draw::select::SelectMap::end_sync(), blender::eevee::VelocityModule::end_sync(), blender::gpu::MTLContext::ensure_texture_bindings(), blender::gpu::MTLContext::ensure_texture_bindings(), GPU_indexbuf_join(), ibJpegImageFromCinfo(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), and blender::gpu::MTLScratchBufferManager::scratch_buffer_allocate_range_aligned().
| MINLINE size_t max_zz | ( | size_t | a, |
| size_t | b ) |
Definition at line 435 of file math_base_inline.cc.
| MINLINE double min_dd | ( | double | a, |
| double | b ) |
Definition at line 354 of file math_base_inline.cc.
| MINLINE float min_ff | ( | float | a, |
| float | b ) |
Definition at line 320 of file math_base_inline.cc.
Referenced by alpha_circle_mask(), annotation_draw_apply(), apply_heights_callback(), area_draw_azone_fullscreen(), blender::ed::space_node::backimage_fit_exec(), bezier_clamp(), bezier_handle_calc_smooth_fcurve(), BKE_curvemapping_changed(), BKE_curvemapping_set_defaults(), BKE_curveprofile_move_point(), BKE_maskrasterize_handle_sample(), BKE_tracking_marker_clamp_search_size(), blend_color_add_alpha_float(), blend_color_darken_float(), blend_color_dodge_float(), blend_color_hardlight_float(), blend_color_linearlight_float(), blend_color_overlay_float(), blend_color_pinlight_float(), blend_color_vividlight_float(), blo_do_versions_270(), blo_do_versions_300(), blo_do_versions_400(), bm_decim_build_edge_cost_single__topology(), bm_decim_build_edge_cost_single_squared__topology(), bmo_create_uvsphere_exec(), bmo_dissolve_degenerate_exec(), bmo_dissolve_limit_exec(), boid_body(), btw_smooth_graph_keys(), butterworth_smooth_fcurve_segment(), button2d_geom_draw_backdrop(), calc_bevfac_mapping(), blender::ed::sculpt_paint::expand::calc_new_mask_mesh(), blender::ed::transform::calc_tw_center(), calctrackballvec(), calculate_autoscale_factor(), calculate_bezt_bounds_y(), calculate_collision_balls(), calculate_fpt_bounds(), ccd_mesh_make(), ccd_mesh_update(), blender::ed::vse::channel_draw_context_init(), blender::seq::check_zone(), clamp_nonzero(), clip_view_calculate_view_selection(), blender::ed::transform::clipUVData(), cloth_collision_response_static(), cloth_record_result(), cloth_selfcollision_response_static(), computeAngularWeight(), computeBindWeights(), convert_tree(), curvemap_make_table(), damptrack_do_transform(), dist_signed_squared_to_corner_v3v3v3(), do_multires_bake(), do_projectpaint_thread(), draw_fcurve_curve(), draw_keylist_block_gpencil(), draw_marker_slide_zones(), blender::ed::vse::draw_seq_fcurve_overlay(), blender::ed::vse::draw_seq_in_view(), blender::ed::vse::draw_seq_text_overlay(), blender::ed::vse::draw_seq_waveform_overlay(), blender::ed::vse::draw_strip_icons(), blender::ed::vse::drawmeta_contents(), dynamic_paint_effect_drip_cb(), dynamic_paint_effect_spread_cb(), ED_view3d_backbuf_sample_size_clamp(), ED_view3d_update_viewmat(), blender::ed::transform::edge_slide_apply_elem(), expand_key_bounds(), fcurve_scene_coord_range_get(), find_next_key(), flyApply(), flyEvent(), geodesic_distance_propagate_across_triangle(), blender::animrig::get_frame_range_of_fcurves(), get_keyframe_extents(), blender::bke::pbvh::uv_islands::UVIslandsMask::Tile::get_pixel_size_in_uv_space(), blender::ed::vse::get_seq_strip_thumbnails(), get_shortest_pattern_side(), getArrowEndPoint(), gpu_texture_create_tile_array(), image_view_all(), IMB_rectblend(), immDrawBorderCorners(), blender::ed::sculpt_paint::expand::init_from_face_set_boundary(), blender::ed::vse::inner_clickable_handle_size_get(), isect_seg_seg_v2_point_ex(), knife_snap_size(), blender::ed::vse::label_rect_get(), layer_bucket_init(), line_rect_clip(), make_box_union(), merge_frame_corners(), blender::color::FloatTraits::min(), min_fff(), min_ffff(), mix_normals(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modify_mesh(), modify_mesh(), move_segment(), nla_action_draw_keyframes(), blender::ed::space_node::node_insert_on_link_flags_set(), blender::ed::space_node::node_update_basis(), blender::ed::object::object_warp_transverts_minmax_x(), paint_calculate_rake_rotation(), pipe_adj_vmesh(), quad_calc_error(), radial_control_invoke(), ramp_blend(), blender::eevee::DepthOfField::render(), blender::ed::vse::retiming_fake_key_frame_clicked(), rgb_to_hsl(), rgb_to_hsv(), RNA_property_float_ui_range(), blender::gpu::GLTexture::samplers_update(), sb_detect_edge_collisionCached(), scan_for_ext_face_forces(), scanfill(), blender::ed::vse::seq_view_collection_rect_preview(), blender::ed::vse::sequencer_main_clamp_view(), blender::ed::vse::sequencer_retiming_draw_continuity(), blender::ed::vse::sequencer_view_all_preview_exec(), sima_zoom_set_from_bounds(), SimpleDeformModifier_do(), slider_update_factor(), smooth_view_rect_to_fac(), smoothminf(), snap_to_superellipsoid(), softbody_apply_forces(), softbody_step(), sphclassical_calc_dens(), spline_under_mouse_get(), splineik_evaluate_bone(), stitch_island_calculate_edge_rotation(), stitch_island_calculate_vert_rotation(), stretchto_evaluate(), blender::ed::vse::strip_draw_context_get(), blender::ed::vse::strip_handle_draw_size_get(), blender::ed::vse::strip_header_size_get(), texture_value_blend(), blender::geometry::Occupancy::trace_triangle(), blender::ed::transform::transformEvent(), ui_but_range_set_soft(), ui_do_animate(), ui_do_but_NUM(), ui_draw_but_CURVE(), ui_draw_but_CURVEPROFILE(), ui_draw_but_UNITVEC(), ui_draw_dropshadow(), ui_menu_scroll_apply_offset_y(), ui_numedit_begin(), ui_numedit_but_HISTOGRAM(), ui_numedit_but_HSVCIRCLE(), ui_numedit_set_active(), ui_popup_block_refresh(), UI_text_clip_middle_ex(), ui_update_flexible_spacing(), unified_findnearest(), blender::ed::sculpt_paint::expand::update_mask_bmesh(), blender::ed::sculpt_paint::expand::update_mask_grids(), uv_map_mirror(), uv_rip_single_from_loop(), versioning_eevee_material_blend_mode_settings(), vfont_to_curve(), view3d_center_camera_exec(), view3d_ruler_pick(), view_all_exec(), blender::ed::space_node::viewer_border_exec(), walkApply(), walkEvent(), zbuf_add_to_span(), and zspan_scanconvert().
| MINLINE float min_fff | ( | float | a, |
| float | b, | ||
| float | c ) |
Definition at line 395 of file math_base_inline.cc.
References b, min_ff(), and MINLINE.
Referenced by BKE_mball_element_display_radius_calc(), BKE_mball_element_display_radius_calc_with_stiffness(), calculate_bezt_bounds_x(), calculate_bezt_bounds_y(), blender::bke::pbvh::pixels::do_encode_pixels(), dynamic_paint_effect_spread_cb(), gizmo_ruler_draw(), blender::ed::transform::graph_key_shortest_dist(), imagewraposa(), imagewraposa_aniso(), intersect_line_tri(), knifetool_draw_angle(), blender::seq::load_mask_min(), min_ffff(), project_bucket_clip_face(), blender::seq::retiming_transition_key_frame_set(), rgb_to_hsl(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), blender::geometry::Occupancy::trace_triangle(), and view3d_ruler_pick().
| MINLINE float min_ffff | ( | float | a, |
| float | b, | ||
| float | c, | ||
| float | d ) |
Definition at line 413 of file math_base_inline.cc.
References b, min_ff(), min_fff(), and MINLINE.
Referenced by calculate_bezt_draw_resolution(), closest_seg_seg_v2(), dist_seg_seg_v2(), expand_key_bounds(), and blender::ed::space_node::node_link_draw_is_visible().
| MINLINE int min_ii | ( | int | a, |
| int | b ) |
Definition at line 363 of file math_base_inline.cc.
Referenced by accessor_get_ibuf(), add_bezt_vertices(), blender::bke::pbvh::uv_islands::add_uv_island(), animviz_calc_motionpaths(), blender::seq::AddEffectOp::apply(), area_move_set_limits(), azone_clipped_rect_calc(), BKE_autotrack_context_sync(), BKE_blendfile_userdef_from_defaults(), BKE_image_get_tile_info(), BKE_key_evaluate_object_ex(), BKE_keyblock_convert_to_curve(), BKE_keyblock_convert_to_lattice(), BKE_mask_spline_feather_collapse_inner_loops(), BKE_maskrasterize_handle_init(), BKE_mesh_remap_calc_edges_from_mesh(), BKE_tracking_get_projection_matrix(), BKE_tracking_reconstruction_context_new(), BKE_tracking_tracks_first_last_frame_minmax(), blend_color_add_alpha_byte(), blend_color_add_byte(), blend_color_darken_byte(), blend_color_dodge_byte(), blend_color_exclusion_byte(), blend_color_hardlight_byte(), blend_color_linearlight_byte(), blend_color_overlay_byte(), blend_color_pinlight_byte(), blend_color_vividlight_byte(), BLI_bitmap_draw_2d_poly_v2i_n(), BLI_rcti_do_minmax_rcti(), blo_do_versions_280(), BM_mesh_bm_from_me(), blender::ed::transform::bm_mesh_edges_select_get_n(), BM_mesh_partial_create_from_verts(), BM_mesh_partial_create_from_verts_group_multi(), BM_mesh_partial_create_from_verts_group_single(), blender::ed::transform::bm_mesh_verts_select_get_n(), bmo_bisect_plane_exec(), brush_painter_imbuf_partial_update(), brush_painter_mask_imbuf_partial_update(), butterworth_smooth_fcurve_segment(), calcknots(), calculate_autoscale_factor(), blender::bke::curves::nurbs::calculate_knots(), channels_bake_exec(), blender::seq::check_zone(), clamp_i(), cloth_record_result(), color_clamp_index(), colorband_init_from_table_rgba_simple(), console_select_to_buffer(), cp_cu_key(), blender::ed::transform::createTransSeqData(), CurveProfile_buttons_layout(), blender::bke::pbvh::pixels::do_encode_pixels(), do_history(), dopesheet_view_all_exec(), draw_movieclip_cache(), draw_textscroll(), blender::ed::vse::drawmeta_contents(), ED_region_header_layout(), ED_region_info_draw_multiline(), ED_region_panels_layout_ex(), ED_view3d_depth_read_cached(), edbm_fill_grid_prepare(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::LightModule::end_sync(), blender::gpu::MTLContext::ensure_render_pipeline_state(), euler_filter_perform_filter(), fcurve_scene_coord_range_get(), file_draw_list(), filelist_file_cache_block(), find_next_key(), blender::bke::pbvh::pixels::Rows::find_second_source(), gesture_box_apply_rect(), blender::gpu::VKQueryPool::get_occlusion_result(), get_render_subsurf_level(), GPU_batch_draw_advanced(), GPU_batch_draw_parameter_get(), GPU_texture_size_with_limit(), gpu_texture_update_from_ibuf(), imb_loadiris(), blender::eevee::ShadowModule::init(), blender::workbench::CavityEffect::init(), blender::workbench::SceneState::init(), ViewportColorSampleSession::init(), blender::gpu::Texture::init_1D(), blender::gpu::Texture::init_2D(), blender::gpu::Texture::init_3D(), blender::bke::image::partial_update::TileChangeset::init_chunks(), blender::gpu::Texture::init_cubemap(), blender::gpu::Texture::init_view(), blender::bke::image::partial_update::TileChangeset::mark_region(), mathutils_matrix_col_get(), mathutils_matrix_col_set(), Matrix_to_NxN(), matrix_unit_internal(), blender::color::ByteTraits::min(), min_iii(), min_iiii(), MOD_meshcache_calc_range(), motionpath_calculate_update_range(), motionpath_get_global_framerange(), blender::seq::multiply_ibuf(), blender::ed::space_node::node_update_basis_socket(), non_recursive_bvh_div_nodes(), paste_get_y_offset(), prefetch_get_final_frame(), blender::gpu::present(), psys_get_pointcache_start_end(), psys_tasks_create(), blender::seq::query_right_side_strips(), radial_control_invoke(), read_bone_collections(), blender::ed::vse::realize_fake_keys_in_rect(), blender::gpu::FrameBuffer::recursive_downsample(), blender::eevee::DepthOfField::render(), blender::ed::vse::right_fake_key_frame_get(), RNA_property_int_ui_range(), round_box__edges(), blender::eevee::ShadowModule::screen_pixel_radius(), seq_update_meta_disp_range(), blender::ed::vse::seq_view_collection_rect_timeline(), blender::seq::sequencer_all_free_anim_ibufs(), blender::ed::vse::sequencer_image_seq_get_minmax_frame(), blender::ed::vse::sequencer_meta_make_exec(), blender::ed::vse::sequencer_select_side_exec(), blender::ed::vse::sequencer_set_range_to_strips_exec(), blender::ed::vse::sequencer_visible_strips_get(), blender::eevee::ShadowTileMapPool::ShadowTileMapPool(), blender::seq::shuffle_strip_time_offset_get(), SIM_hair_volume_add_segment(), blender::seq::strip_time_effect_range_set(), blender::seq::strip_update_sound_bounds_recursive_impl(), svd_m4(), blender::ed::asset::take_screenshot_crop(), blender::draw::TestDefrag::TestDefrag(), textview_draw_sel(), tile_remove_exec(), blender::seq::time_update_meta_strip_range(), track_init_markers(), tracking_dopesheet_calc_coverage(), ui_block_func_POPUP(), ui_but_drag_init(), ui_do_but_NUM(), ui_draw_but_HSVCIRCLE(), ui_hsvcircle_pos_from_vals(), ui_hsvcircle_vals_from_pos(), ui_item_array(), ui_litem_estimate_absolute(), ui_litem_estimate_column_flow(), ui_litem_estimate_grid_flow(), ui_litem_layout_absolute(), ui_litem_layout_column_flow(), ui_litem_layout_grid_flow(), ui_litem_layout_radial(), ui_litem_layout_row(), ui_panels_size(), ui_searchbox_region_draw_cb__operator(), ui_tooltip_create_with_data(), uilist_prepare(), uiTemplateReportsBanner(), blender::ed::sculpt_paint::update_curve_mask(), blender::gpu::MTLBufferPool::update_memory_pools(), vfont_to_curve(), blender::gpu::MTLShader::warm_cache(), widget_numbut_draw(), WM_operator_properties_checker_interval(), wm_xr_session_action_test_bimanual(), and zspan_scanconvert().
| MINLINE int min_iii | ( | int | a, |
| int | b, | ||
| int | c ) |
Definition at line 404 of file math_base_inline.cc.
References b, min_ii(), and MINLINE.
Referenced by blender::seq::load_mask_min(), min_iiii(), and blender::ed::object::parent_set_vert_find().
| MINLINE int min_iiii | ( | int | a, |
| int | b, | ||
| int | c, | ||
| int | d ) |
Definition at line 422 of file math_base_inline.cc.
References b, min_ii(), min_iii(), and MINLINE.
Referenced by _bli_array_iter_spiral_square().
Definition at line 381 of file math_base_inline.cc.
Referenced by blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::gpu::MTLVertBuf::bind(), and blender::gpu::MTLVertBuf::read().
Definition at line 372 of file math_base_inline.cc.
Referenced by blender::gpu::VKBackend::capabilities_init(), blender::draw::command::Draw::Draw(), GPU_indexbuf_build_curves_on_device(), GPU_indexbuf_join(), ibJpegImageFromCinfo(), blender::draw::StorageArrayBuffer< uint, 1024, true >::resize(), blender::gpu::MTLContext::texture_unbind(), and blender::gpu::MTLContext::texture_unbind_all().
| MINLINE size_t min_zz | ( | size_t | a, |
| size_t | b ) |
Definition at line 431 of file math_base_inline.cc.
Referenced by BLI_system_memory_max_in_megabytes_int(), max_memory_in_megabytes_int(), and ui_apply_but_undo().
| MINLINE int mod_i | ( | int | i, |
| int | n ) |
Floored modulo that is useful for wrapping numbers over n, including when i is negative.
This is the same as Python % or GLSL mod(): mod_i(-5, 3) = 1.
Definition at line 254 of file math_base_inline.cc.
Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), BKE_nurb_index_from_uv(), BKE_scene_frame_snap_by_seconds(), bridge_loop_pair(), curve_dissolve_exec(), ed_dissolve_bez_segment(), edbm_fill_grid_prepare(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertInput::get_varray_for_context(), mat3_align_axis_to_v3(), project_paint_uvpixel_init(), RNA_property_enum_step(), setup_vertex_point(), smooth_exec(), WM_operator_properties_checker_interval_from_op(), and wm_software_cursor_draw().
| MINLINE float pingpongf | ( | float | value, |
| float | scale ) |
Definition at line 276 of file math_base_inline.cc.
References fabsf, fractf(), and MINLINE.
Referenced by svm_math(), blender::nodes::try_dispatch_float_math_fl_fl_to_fl(), and valuefn().
| MINLINE float pow2f | ( | float | x | ) |
Definition at line 29 of file math_base_inline.cc.
Referenced by blender::ed::spreadsheet::apply_row_filter(), BKE_brush_gen_radial_control_imbuf(), BKE_curveprofile_update(), BKE_kelvinlet_grab_triscale(), blender::ed::sculpt_paint::cache_paint_invariants_update(), blender::ed::sculpt_paint::filter::calc_sharpen_detail_translations(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical(), draw_start_vertex_circle(), ease_sigmoid_function(), blender::draw::edituv_get_edituv_stretch_angle(), blender::ed::curves::find_closest_curve_to_screen_co(), blender::ed::curves::find_closest_point_to_screen_co(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::find_curves_brush_position(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::eevee::Film::init(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_bmesh(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_grids(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_mesh(), init_kelvinlet_grab(), kelvinlet_scale(), kelvinlet_twist(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_projected(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_spherical(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_spherical(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical(), pow3f(), pow4f(), pow7f(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), SCULPT_calc_vertex_displacement(), blender::ed::curves::select_circle(), blender::ed::curves::select_circle_mask(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), sphclassical_force_cb(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook(), ui_numedit_but_HISTOGRAM(), UI_view2d_dot_grid_draw(), blender::ed::sculpt_paint::use_add_density_mode(), and WM_gesture_lasso_modal().
| MINLINE float pow3f | ( | float | x | ) |
Definition at line 33 of file math_base_inline.cc.
References MINLINE, pow2f(), and x.
Referenced by BKE_brush_calc_curve_factors(), BKE_brush_curve_strength(), blender::ed::sculpt_paint::brush_dynamic_size_get(), init_kelvinlet_grab(), kelvinlet_scale(), kelvinlet_twist(), pow7f(), samevolume_evaluate(), sphclassical_density_accum_cb(), sphclassical_force_cb(), and ui_hsvcircle_pos_from_vals().
| MINLINE float pow4f | ( | float | x | ) |
Definition at line 37 of file math_base_inline.cc.
References MINLINE, pow2f(), and x.
Referenced by brush_strength(), cloth_apply_vgroup(), pow5f(), sphclassical_density_accum_cb(), and sphclassical_force_cb().
| MINLINE float pow5f | ( | float | x | ) |
Definition at line 41 of file math_base_inline.cc.
References MINLINE, pow4f(), and x.
Referenced by kelvinlet_scale(), and kelvinlet_twist().
| MINLINE float pow7f | ( | float | x | ) |
Definition at line 45 of file math_base_inline.cc.
References MINLINE, pow2f(), pow3f(), and x.
Referenced by sphclassical_force_cb().
| MINLINE float power_of_2 | ( | float | f | ) |
Used for zoom values.
Definition at line 99 of file math_base_inline.cc.
References ceil, log, M_LN2, MINLINE, and pow.
Referenced by clip_view_calculate_view_selection(), image_view_all(), blender::ed::vse::sequencer_view_all_preview_exec(), and view_all_exec().
| MINLINE int power_of_2_max_i | ( | int | n | ) |
Returns next (or previous) power of 2 or the input number if it is already a power of 2.
Definition at line 109 of file math_base_inline.cc.
References is_power_of_2_i(), and MINLINE.
Referenced by array_chunk_size_calc(), checker_board_color_fill(), blender::compositor::jump_flooding(), blender::eevee::RayTraceModule::render(), set_profile_spacing(), and blender::eevee::RayTraceModule::sync().
Definition at line 131 of file math_base_inline.cc.
Referenced by blender::draw::StorageVectorBuffer< IrradianceBrickPacked, 16 >::append_as(), BLI_array_store_at_size_ensure(), BLI_mempool_create(), blender::draw::StorageArrayBuffer< uint, 1024, true >::get_or_resize(), and blender::draw::StorageArrayBuffer< uint, 1024, true >::trim_to_next_power_of_2().
| MINLINE int power_of_2_min_i | ( | int | n | ) |
Definition at line 122 of file math_base_inline.cc.
References is_power_of_2_i(), and MINLINE.
Referenced by blender::bke::calc_edges::get_parallel_maps_count(), and smaller_power_of_2_limit().
| MINLINE double ratiod | ( | double | min, |
| double | max, | ||
| double | pos ) |
Definition at line 93 of file math_base_inline.cc.
References max, min, MINLINE, and pos.
Referenced by lineart_bounding_area_next(), lineart_do_closest_segment(), lineart_intersect_seg_seg(), lineart_line_isec_2d_ignore_line2pos(), lineart_point_on_line_segment(), lineart_shadow_cast_onto_triangle(), and lineart_triangle_edge_image_space_occlusion().
| MINLINE float ratiof | ( | float | min, |
| float | max, | ||
| float | pos ) |
Definition at line 87 of file math_base_inline.cc.
References max, min, MINLINE, and pos.
Referenced by blender::ed::vse::draw_histogram(), blender::ed::vse::init_wave_table(), and lineart_chain_create_crossing_point().
| MINLINE int round_db_to_int | ( | double | a | ) |
Definition at line 195 of file math_base_inline.cc.
References _round_db_impl, and MINLINE.
Referenced by BKE_scene_frame_snap_by_seconds().
| MINLINE int round_db_to_int_clamp | ( | double | a | ) |
Definition at line 208 of file math_base_inline.cc.
References _round_clamp_db_impl.
Referenced by ui_but_value_set().
| MINLINE short round_db_to_short_clamp | ( | double | a | ) |
Definition at line 206 of file math_base_inline.cc.
References _round_clamp_db_impl.
Referenced by ui_but_value_set().
Definition at line 204 of file math_base_inline.cc.
References _round_clamp_db_impl, and MINLINE.
Referenced by ui_but_value_set().
| MINLINE int round_fl_to_int | ( | float | a | ) |
Definition at line 192 of file math_base_inline.cc.
References _round_fl_impl.
Referenced by actkeys_framejump_exec(), blender::ed::vse::align_frame_with_pixel(), ANIM_channel_draw_widgets(), area_move_apply_do(), area_snap_calc_location(), BLF_position(), BLI_timecode_string_from_time(), BLI_timecode_string_from_time_seconds(), change_frame_apply(), blender::ed::transform::cmp_fn(), blender::seq::do_render_strip_uncached(), draw_background(), blender::ed::vse::draw_channels(), draw_current_frame(), blender::ed::vse::draw_seq_waveform_overlay(), ED_annotation_draw_view3d(), ED_area_global_max_size_y(), ED_area_global_min_size_y(), ED_area_global_size_y(), ED_fileselect_init_layout(), ED_markers_find_nearest_marker_time(), ED_markers_post_apply_transform(), ED_region_panel_category_gutter_calc_rect(), ED_region_panels_draw(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), file_add_icon_but(), file_draw_list(), file_draw_string(), blender::ed::transform::flushTransSeq(), frame_from_event(), frame_from_event(), gather_frames_to_render_for_adt(), graphkeys_framejump_exec(), graphkeys_previewrange_exec(), graphview_cursor_apply(), icon_draw_rect(), blender::seq::image_size_to_thumb_size(), imagewraposa_aniso(), blender::ed::vse::label_str_get(), MOD_meshcache_calc_range(), blender::ed::vse::mouse_over_key_get_from_strip(), nlaedit_previewrange_exec(), blender::ed::space_node::node_draw_hidden(), blender::ed::outliner::outliner_draw_overrides_rna_buts(), panel_draw_aligned_widgets(), blender::ui::AbstractTreeView::persistent_state_apply(), previewrange_define_exec(), blender::ed::transform::recalcData_actedit(), blender::ed::transform::recalcData_sequencer_retiming(), blender::seq::render_give_stripelem(), blender::seq::retiming_key_speed_get(), blender::seq::retiming_key_speed_set(), blender::seq::retiming_key_timeline_frame_get(), blender::seq::seq_proxy_fetch(), blender::seq::seq_render_movie_strip_custom_file_proxy(), blender::seq::seq_render_movie_strip_view(), blender::ed::transform::seq_snap_threshold_get_frame_distance(), blender::seq::seq_split_set_left_hold_offset(), blender::seq::seq_split_set_right_hold_offset(), blender::ed::vse::sequencer_main_cursor(), blender::ed::vse::sequencer_slip_modal(), blender::ed::vse::sequencer_split_invoke(), blender::ed::transform::snap_calc_timeline(), blender::ed::greasepencil::snap_selected_frames(), blender::ed::vse::strip_get_thumb_image_dimensions(), blender::seq::strip_speed_effect_target_frame_get(), text_draw_rect_get(), blender::seq::time_get_rounded_sound_offset(), blender::ed::transform::transform_convert_sequencer_channel_clamp(), ui_do_drag(), ui_numedit_but_NUM(), ui_numedit_but_SLI(), UI_panel_category_draw_all(), UI_preview_tile_size_x(), UI_preview_tile_size_y(), UI_preview_tile_size_y_no_label(), uiAlignPanelStep(), uilist_resize_update(), widget_draw_text(), widget_draw_text_icon(), wm_drag_imbuf_icon_height_get(), wm_drag_imbuf_icon_width_get(), WM_event_drag_direction(), and wm_software_cursor_draw_bitmap().
| MINLINE int round_fl_to_int_clamp | ( | float | a | ) |
Definition at line 202 of file math_base_inline.cc.
References _round_clamp_fl_impl.
Referenced by ui_do_but_NUM().
| MINLINE short round_fl_to_short | ( | float | a | ) |
Definition at line 191 of file math_base_inline.cc.
References _round_fl_impl.
Referenced by screen_geom_find_area_split_point(), and screen_geom_vertices_scale_pass().
Definition at line 190 of file math_base_inline.cc.
References _round_fl_impl, and MINLINE.
Referenced by blender::color::ByteTraits::round().
Definition at line 200 of file math_base_inline.cc.
References _round_clamp_fl_impl, and MINLINE.
Referenced by blend_color_softlight_byte(), layerInterp_mcol(), and layerInterp_mloopcol().
Definition at line 193 of file math_base_inline.cc.
References _round_fl_impl.
Referenced by blf_ensure_size(), and blf_font_size().
| MINLINE float round_to_even | ( | float | f | ) |
Round to closest even number, halfway cases are rounded away from zero.
Definition at line 213 of file math_base_inline.cc.
References MINLINE.
| MINLINE float signf | ( | float | f | ) |
Definition at line 565 of file math_base_inline.cc.
| MINLINE int signum_i | ( | float | a | ) |
Definition at line 592 of file math_base_inline.cc.
References MINLINE.
Referenced by bm_loop_collapse_is_degenerate(), get_uv_face_needle(), gizmo_cage2d_modal(), gizmo_cage3d_modal(), smooth_fcurve_segment(), and blender::ed::object::vgroup_smooth_subset().
| MINLINE int signum_i_ex | ( | float | a, |
| float | eps ) |
Definition at line 581 of file math_base_inline.cc.
Referenced by BLI_polyfill_edge_calc_rotate_beauty__area().
| MINLINE float smoothminf | ( | float | a, |
| float | b, | ||
| float | c ) |
Definition at line 329 of file math_base_inline.cc.
References b, fabsf, max_ff(), min_ff(), and MINLINE.
Referenced by svm_math(), blender::nodes::try_dispatch_float_math_fl_fl_fl_to_fl(), ui_draw_dropshadow(), and valuefn().
| MINLINE float smoothstep | ( | float | edge0, |
| float | edge1, | ||
| float | x ) |
Definition at line 338 of file math_base_inline.cc.
References MINLINE, result, and x.
Referenced by draw_start_vertex_circle(), fresnel_iridescence(), svm_node_map_range(), blender::noise::voronoi_smooth_f1(), blender::noise::voronoi_smooth_f1(), blender::noise::voronoi_smooth_f1(), blender::noise::voronoi_smooth_f1(), voronoi_smooth_f1(), voronoi_smooth_f1(), voronoi_smooth_f1(), voronoi_smooth_f1(), voronoi_smooth_f1(), voronoi_smooth_f1(), voronoi_smooth_f1(), and voronoi_smooth_f1().
| MINLINE double sqrt3d | ( | double | d | ) |
Definition at line 61 of file math_base_inline.cc.
References exp, log, MINLINE, and UNLIKELY.
Referenced by solve_cubic().
| MINLINE float sqrt3f | ( | float | f | ) |
Definition at line 50 of file math_base_inline.cc.
References exp, log, MINLINE, and UNLIKELY.
Referenced by ui_numedit_but_HSVCIRCLE().
| MINLINE float sqrtf_signed | ( | float | f | ) |
Definition at line 72 of file math_base_inline.cc.
References MINLINE, and sqrtf.
Referenced by blender::seq::invGammaCorrect(), mesh_calc_eigen_matrix(), and modify_mesh().
| MINLINE float square_f | ( | float | a | ) |
Definition at line 301 of file math_base_inline.cc.
References MINLINE.
Referenced by BKE_brush_jitter_pos(), bm_edge_symmetry_map(), bm_edgexedge_isect_impl(), bm_edgexvert_isect_impl(), BM_mesh_intersect_edges(), bmo_planar_faces_exec(), blender::ed::sculpt_paint::brush_delta_update(), calc_duplicates_fast(), calctrackballvec(), cloth_collision_response_static(), cloth_selfcollision_response_static(), contarget_get_mesh_mat(), blender::ed::curves::curve_draw_event_add(), curve_draw_event_add(), blender::ed::curves::curve_draw_exec_precalc(), curve_draw_exec_precalc(), curve_draw_modal(), blender::ed::curves::curves_draw_modal(), blender::deform_drawing(), deformVerts_do(), dist_squared_ray_to_seg_v3(), dynamic_paint_find_island_border(), ED_armature_from_edit(), EDBM_verts_mirror_cache_begin_ex(), execute_posetree(), gizmo_arrow_test_select(), blender::workbench::CavityEffect::init(), is_quad_convex_v3(), isect_seg_seg_v2_point_ex(), len_squared_vnvn(), blender::bke::pbvh::long_edge_queue_edge_add_recursive(), mat4_to_dquat(), blender::bke::mesh_edges_spherecast(), blender::geometry::mesh_merge_by_distance_connected(), mesh_remove_doubles_on_axis(), mouse_to_plane_slide_zone_distance_squared(), mouse_to_slide_zone_distance_squared(), object_mouse_select_menu(), blender::ed::sculpt_paint::paint_smooth_stroke(), py_bvhtree_find_nearest_range(), blender::eevee::Sampling::sample_ball(), blender::eevee::Sampling::sample_hemisphere(), blender::eevee::Sampling::sample_sphere(), blender::ed::transform::snap_object_project_view3d_ex(), blender::ed::transform::snap_target_uv_fn(), sphere_normal_from_uv(), spline_under_mouse_get(), blender::ed::vse::strip_select_from_preview(), blender::eevee::BackgroundPipeline::sync(), ui_do_but_CURVE(), ui_do_but_CURVEPROFILE(), uv_find_nearest_edge(), uv_find_nearest_vert(), uv_image_outset(), uv_nearest_hit_init_dist_px(), v3d_cursor_plane_draw(), warpModifier_do(), and WM_gesture_lasso_modal().
| MINLINE int square_i | ( | int | a | ) |
Definition at line 291 of file math_base_inline.cc.
References MINLINE.
Referenced by area_actionzone_refresh_xy(), BKE_pbvh_get_grid_num_faces(), ED_image_paint_tile_find(), ED_image_paint_tile_push(), blender::draw::pbvh::ensure_vbos_allocated_grids(), blender::draw::pbvh::fill_face_sets_grids(), blender::eevee::Sampling::init(), blender::eevee::ShadowModule::init(), blender::eevee::SphereProbeAtlasCoord::LocationFinder::LocationFinder(), multires_grid_paint_mask_downsample(), multires_mdisps_downsample_hidden(), multires_mdisps_upsample_hidden(), blender::eevee::Film::pixel_jitter_get(), blender::eevee::Sampling::step(), blender::draw::test_eevee_shadow_page_mask_ex(), blender::draw::test_eevee_shadow_shift_clear(), and utile_alloc().
| MINLINE int square_s | ( | short | a | ) |
Definition at line 286 of file math_base_inline.cc.
References MINLINE.
Referenced by project_state_init().
Definition at line 296 of file math_base_inline.cc.
References MINLINE.
Referenced by blender::draw::pbvh::create_lines_index_grids_flat_layout(), and blender::draw::pbvh::create_tri_index_grids_flat_layout().
Computes the distance between two floats in ulps.
In other words, returns zero if the floats are exactly equal, and otherwise returns 1 plus the number of (unique) representable floats between a and b on the number line.
Notes:
Definition at line 461 of file math_base_inline.cc.
References b, BLI_assert, i, and MINLINE.
Referenced by compare_ff_relative(), normalization_factor_get(), blender::tests::TEST(), and blender::animrig::tests::AnimationEvaluationTest::test_evaluate_layer().
Definition at line 619 of file math_base_inline.cc.
References MINLINE.
Referenced by apply_heights_callback(), bake_ibuf_normalize_displacement(), BKE_curvemapping_evaluate_premulRGB(), blf_glyph_draw_buffer(), brush_painter_imbuf_new(), buf_rectfill_area(), colladaAddColor(), color_blend_v4_v4v4(), do_projectpaint_thread(), dynamic_paint_apply_surface_vpaint_cb(), f_to_char(), float_to_byte_dither_v3(), float_to_byte_dither_v4(), ftochar(), IMB_buffer_byte_from_float(), IMB_buffer_byte_from_float_mask(), IMB_colormanagement_get_luminance_byte(), IMB_unpremultiply_rect(), blender::workbench::Material::pack_data(), blender::draw::pack_rotation_aspect_hardness(), partial_buffer_update_rect(), premul_float_to_straight_uchar(), blender::io::alembic::read_custom_data_mcols(), blender::eevee::IrradianceBake::read_result_packed(), store_float_in_vcol(), and wm_block_splash_image_roundcorners_add().
Definition at line 625 of file math_base_inline.cc.
References MINLINE.
Referenced by blender::draw::AttributeConverter< ColorGeometry4b >::convert(), linearrgb_to_srgb_ushort4(), and blender::draw::particle_pack_mcol().
Definition at line 632 of file math_base_inline.cc.
References MINLINE.
Referenced by premul_ushort_to_straight_uchar(), ushort_to_byte_dither_v4(), and ushort_to_byte_v4().
| MINLINE float wrapf | ( | float | value, |
| float | max, | ||
| float | min ) |
Definition at line 270 of file math_base_inline.cc.
References floorf, max, min, and MINLINE.
Referenced by svm_math(), svm_vector_math(), blender::nodes::try_dispatch_float_math_fl3_fl3_fl3_to_fl3(), blender::nodes::try_dispatch_float_math_fl_fl_fl_to_fl(), and valuefn().