Blender  V3.3
Macros | Functions | Variables
BLI_math_base.h File Reference
#include "BLI_assert.h"
#include "BLI_math_inline.h"
#include "BLI_sys_types.h"
#include <math.h>
#include "intern/math_base_inline.c"

Go to the source code of this file.

Macros

#define M_PI   3.14159265358979323846 /* pi */
 
#define M_PI_2   1.57079632679489661923 /* pi/2 */
 
#define M_PI_4   0.78539816339744830962 /* pi/4 */
 
#define M_SQRT2   1.41421356237309504880 /* sqrt(2) */
 
#define M_SQRT1_2   0.70710678118654752440 /* 1/sqrt(2) */
 
#define M_SQRT3   1.73205080756887729352 /* sqrt(3) */
 
#define M_SQRT1_3   0.57735026918962576450 /* 1/sqrt(3) */
 
#define M_1_PI   0.318309886183790671538 /* 1/pi */
 
#define M_E   2.7182818284590452354 /* e */
 
#define M_LOG2E   1.4426950408889634074 /* log_2 e */
 
#define M_LOG10E   0.43429448190325182765 /* log_10 e */
 
#define M_LN2   0.69314718055994530942 /* log_e 2 */
 
#define M_LN10   2.30258509299404568402 /* log_e 10 */
 
#define NAN_FLT   (*((float *)(&NAN_INT)))
 
#define BLI_ASSERT_UNIT_EPSILON   0.0002f
 
#define BLI_ASSERT_UNIT_EPSILON_DB   0.0002
 
#define BLI_ASSERT_UNIT_V3(v)
 
#define BLI_ASSERT_UNIT_V3_DB(v)
 
#define BLI_ASSERT_UNIT_V2(v)
 
#define BLI_ASSERT_UNIT_QUAT(q)
 
#define BLI_ASSERT_ZERO_M3(m)
 
#define BLI_ASSERT_ZERO_M4(m)
 
#define BLI_ASSERT_UNIT_M3(m)
 

Functions

MINLINE float pow2f (float x)
 
MINLINE float pow3f (float x)
 
MINLINE float pow4f (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 saacosf (float f)
 
MINLINE float saasinf (float f)
 
MINLINE float sasqrtf (float f)
 
MINLINE float saacos (float fac)
 
MINLINE float saasin (float fac)
 
MINLINE float sasqrt (float fac)
 
MINLINE float interpf (float a, float b, float t)
 
MINLINE double interpd (double a, double b, double t)
 
MINLINE float ratiof (float min, float max, float pos)
 
MINLINE double ratiod (double min, double max, double pos)
 
MINLINE float scalenorm (float a, float b, float x)
 
MINLINE double scalenormd (double a, double b, double x)
 
MINLINE int square_s (short a)
 
MINLINE int square_uchar (unsigned char a)
 
MINLINE int cube_s (short a)
 
MINLINE int cube_uchar (unsigned char a)
 
MINLINE int square_i (int a)
 
MINLINE unsigned int square_uint (unsigned int a)
 
MINLINE float square_f (float a)
 
MINLINE double square_d (double a)
 
MINLINE int cube_i (int a)
 
MINLINE unsigned int cube_uint (unsigned int a)
 
MINLINE float cube_f (float a)
 
MINLINE double cube_d (double a)
 
MINLINE float min_ff (float a, float b)
 
MINLINE float max_ff (float a, float b)
 
MINLINE float min_fff (float a, float b, float c)
 
MINLINE float max_fff (float a, float b, float 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 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 int min_iii (int a, int b, int c)
 
MINLINE int max_iii (int a, int b, int c)
 
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 uint min_uu (uint a, uint b)
 
MINLINE uint max_uu (uint a, uint b)
 
MINLINE size_t min_zz (size_t a, size_t b)
 
MINLINE size_t max_zz (size_t a, size_t b)
 
MINLINE char min_cc (char a, char b)
 
MINLINE char max_cc (char a, char b)
 
MINLINE int clamp_i (int value, int min, int max)
 
MINLINE float clamp_f (float value, float min, float max)
 
MINLINE size_t clamp_z (size_t value, size_t min, size_t max)
 
MINLINE int compare_ff (float a, float b, float max_diff)
 
MINLINE int compare_ff_relative (float a, float b, float max_diff, int max_ulps)
 
MINLINE bool compare_threshold_relative (float value1, float value2, float thresh)
 
MINLINE float signf (float f)
 
MINLINE int signum_i_ex (float a, float eps)
 
MINLINE int signum_i (float a)
 
MINLINE float power_of_2 (float f)
 
MINLINE int integer_digits_f (float f)
 
MINLINE int integer_digits_d (double d)
 
MINLINE int integer_digits_i (int i)
 
MINLINE int is_power_of_2_i (int n)
 
MINLINE unsigned int log2_floor_u (unsigned int x)
 
MINLINE unsigned int log2_ceil_u (unsigned int x)
 
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 power_of_2_min_u (unsigned int x)
 
MINLINE int divide_round_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 round_to_even (float f)
 
MINLINE signed char round_fl_to_char (float a)
 
MINLINE unsigned char round_fl_to_uchar (float a)
 
MINLINE short round_fl_to_short (float a)
 
MINLINE unsigned short round_fl_to_ushort (float a)
 
MINLINE int round_fl_to_int (float a)
 
MINLINE unsigned int round_fl_to_uint (float a)
 
MINLINE signed char round_db_to_char (double a)
 
MINLINE unsigned char round_db_to_uchar (double a)
 
MINLINE short round_db_to_short (double a)
 
MINLINE unsigned short round_db_to_ushort (double a)
 
MINLINE int round_db_to_int (double a)
 
MINLINE unsigned int round_db_to_uint (double a)
 
MINLINE signed char round_fl_to_char_clamp (float a)
 
MINLINE unsigned char round_fl_to_uchar_clamp (float a)
 
MINLINE short round_fl_to_short_clamp (float a)
 
MINLINE unsigned short round_fl_to_ushort_clamp (float a)
 
MINLINE int round_fl_to_int_clamp (float a)
 
MINLINE unsigned int round_fl_to_uint_clamp (float a)
 
MINLINE signed char round_db_to_char_clamp (double a)
 
MINLINE unsigned char round_db_to_uchar_clamp (double a)
 
MINLINE short round_db_to_short_clamp (double a)
 
MINLINE unsigned short round_db_to_ushort_clamp (double a)
 
MINLINE int round_db_to_int_clamp (double a)
 
MINLINE unsigned int round_db_to_uint_clamp (double a)
 
int pow_i (int base, int exp)
 
double double_round (double x, int ndigits)
 
float floor_power_of_10 (float f)
 
float ceil_power_of_10 (float f)
 

Variables

static const int NAN_INT = 0x7FC00000
 

Macro Definition Documentation

◆ BLI_ASSERT_UNIT_EPSILON

#define BLI_ASSERT_UNIT_EPSILON   0.0002f
Note
0.0001 is too small because normals may be converted from short's: see T34322.

Definition at line 312 of file BLI_math_base.h.

◆ BLI_ASSERT_UNIT_EPSILON_DB

#define BLI_ASSERT_UNIT_EPSILON_DB   0.0002

Definition at line 313 of file BLI_math_base.h.

◆ BLI_ASSERT_UNIT_M3

#define BLI_ASSERT_UNIT_M3 (   m)
Value:
{ \
BLI_ASSERT_UNIT_V3((m)[0]); \
BLI_ASSERT_UNIT_V3((m)[1]); \
BLI_ASSERT_UNIT_V3((m)[2]); \
} \
(void)0
SyclQueue void void size_t num_bytes void

Definition at line 362 of file BLI_math_base.h.

◆ BLI_ASSERT_UNIT_QUAT

#define BLI_ASSERT_UNIT_QUAT (   q)
Value:
{ \
const float _test_unit = dot_qtqt(q, q); \
BLI_assert(!(fabsf(_test_unit - 1.0f) >= BLI_ASSERT_UNIT_EPSILON * 10) || \
!(fabsf(_test_unit) >= BLI_ASSERT_UNIT_EPSILON * 10)); \
} \
(void)0
#define BLI_ASSERT_UNIT_EPSILON
float dot_qtqt(const float a[4], const float b[4])
Definition: math_rotation.c:92
#define fabsf(x)
Definition: metal/compat.h:219

Definition at line 343 of file BLI_math_base.h.

◆ BLI_ASSERT_UNIT_V2

#define BLI_ASSERT_UNIT_V2 (   v)
Value:
{ \
const float _test_unit = len_squared_v2(v); \
BLI_assert(!(fabsf(_test_unit - 1.0f) >= BLI_ASSERT_UNIT_EPSILON) || \
!(fabsf(_test_unit) >= BLI_ASSERT_UNIT_EPSILON)); \
} \
(void)0
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
ATTR_WARN_UNUSED_RESULT const BMVert * v

Definition at line 335 of file BLI_math_base.h.

◆ BLI_ASSERT_UNIT_V3

#define BLI_ASSERT_UNIT_V3 (   v)
Value:
{ \
const float _test_unit = len_squared_v3(v); \
BLI_assert(!(fabsf(_test_unit - 1.0f) >= BLI_ASSERT_UNIT_EPSILON) || \
!(fabsf(_test_unit) >= BLI_ASSERT_UNIT_EPSILON)); \
} \
(void)0
MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
Note
Checks are flipped so NAN doesn't assert. This is done because we're making sure the value was normalized and in the case we don't want NAN to be raising asserts since there is nothing to be done in that case.

Definition at line 319 of file BLI_math_base.h.

◆ BLI_ASSERT_UNIT_V3_DB

#define BLI_ASSERT_UNIT_V3_DB (   v)
Value:
{ \
const double _test_unit = len_squared_v3_db(v); \
BLI_assert(!(fabs(_test_unit - 1.0) >= BLI_ASSERT_UNIT_EPSILON_DB) || \
!(fabs(_test_unit) >= BLI_ASSERT_UNIT_EPSILON_DB)); \
} \
(void)0
#define BLI_ASSERT_UNIT_EPSILON_DB
MINLINE double len_squared_v3_db(const double v[3]) ATTR_WARN_UNUSED_RESULT
ccl_device_inline float2 fabs(const float2 &a)
Definition: math_float2.h:222

Definition at line 327 of file BLI_math_base.h.

◆ BLI_ASSERT_ZERO_M3

#define BLI_ASSERT_ZERO_M3 (   m)
Value:
{ \
BLI_assert(dot_vn_vn((const float *)m, (const float *)m, 9) != 0.0); \
} \
(void)0
double dot_vn_vn(const float *array_src_a, const float *array_src_b, int size) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:978

Definition at line 351 of file BLI_math_base.h.

◆ BLI_ASSERT_ZERO_M4

#define BLI_ASSERT_ZERO_M4 (   m)
Value:
{ \
BLI_assert(dot_vn_vn((const float *)m, (const float *)m, 16) != 0.0); \
} \
(void)0

Definition at line 357 of file BLI_math_base.h.

◆ M_1_PI

#define M_1_PI   0.318309886183790671538 /* 1/pi */

Definition at line 41 of file BLI_math_base.h.

◆ M_E

#define M_E   2.7182818284590452354 /* e */

Definition at line 44 of file BLI_math_base.h.

◆ M_LN10

#define M_LN10   2.30258509299404568402 /* log_e 10 */

Definition at line 56 of file BLI_math_base.h.

◆ M_LN2

#define M_LN2   0.69314718055994530942 /* log_e 2 */

Definition at line 53 of file BLI_math_base.h.

◆ M_LOG10E

#define M_LOG10E   0.43429448190325182765 /* log_10 e */

Definition at line 50 of file BLI_math_base.h.

◆ M_LOG2E

#define M_LOG2E   1.4426950408889634074 /* log_2 e */

Definition at line 47 of file BLI_math_base.h.

◆ M_PI

#define M_PI   3.14159265358979323846 /* pi */

Definition at line 20 of file BLI_math_base.h.

◆ M_PI_2

#define M_PI_2   1.57079632679489661923 /* pi/2 */

Definition at line 23 of file BLI_math_base.h.

◆ M_PI_4

#define M_PI_4   0.78539816339744830962 /* pi/4 */

Definition at line 26 of file BLI_math_base.h.

◆ M_SQRT1_2

#define M_SQRT1_2   0.70710678118654752440 /* 1/sqrt(2) */

Definition at line 32 of file BLI_math_base.h.

◆ M_SQRT1_3

#define M_SQRT1_3   0.57735026918962576450 /* 1/sqrt(3) */

Definition at line 38 of file BLI_math_base.h.

◆ M_SQRT2

#define M_SQRT2   1.41421356237309504880 /* sqrt(2) */

Definition at line 29 of file BLI_math_base.h.

◆ M_SQRT3

#define M_SQRT3   1.73205080756887729352 /* sqrt(3) */

Definition at line 35 of file BLI_math_base.h.

◆ NAN_FLT

#define NAN_FLT   (*((float *)(&NAN_INT)))

Definition at line 63 of file BLI_math_base.h.

Function Documentation

◆ ceil_power_of_10()

float ceil_power_of_10 ( float  f)

Ceiling to the nearest power of 10, e.g.:

  • 15.0 -> 100.0
  • 0.015 -> 0.1
  • 1.0 -> 1.0
Parameters
fValue to ceiling, must be over 0.0.
Note
If we wanted to support signed values we could if this becomes necessary.

Definition at line 73 of file math_base.c.

References BLI_assert, floorf, and powf.

Referenced by blender::tests::TEST(), and v3d_cursor_plane_draw().

◆ ceil_to_multiple_u()

MINLINE uint ceil_to_multiple_u ( uint  a,
uint  b 
)

Returns a if it is a multiple of b or the next multiple or b after a .

Definition at line 381 of file math_base_inline.c.

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

◆ ceil_to_multiple_ul()

MINLINE uint64_t ceil_to_multiple_ul ( uint64_t  a,
uint64_t  b 
)

◆ clamp_f()

MINLINE float clamp_f ( float  value,
float  min,
float  max 
)

Definition at line 613 of file math_base_inline.c.

References max, and min.

Referenced by BKE_curvemapping_integrate_clamped(), BKE_curveprofile_update(), BKE_where_on_path(), BM_mesh_intersect(), bpy_bm_utils_edge_split(), bpy_bm_utils_vert_collapse_faces(), bpy_bmdeformvert_ass_subscript(), BPy_BMLayerItem_SetItem(), bpy_bmvert_copy_from_vert_interp(), blender::nodes::node_shader_tex_brick_cc::BrickFunction::brick(), calc_area_normal_and_center_task_cb(), blender::nodes::node_shader_mix_rgb_cc::MixRGBFunction::call(), color_filter_task_cb(), blender::compositor::TimeNode::convert_to_operations(), deformStroke(), do_cloth_brush_apply_forces_task_cb_ex(), do_clump_level(), do_displacement_eraser_brush_task_cb_ex(), do_displacement_smear_brush_task_cb_ex(), blender::bke::pbvh::pixels::do_encode_pixels(), do_layer_brush_task_cb_ex(), do_mask_brush_draw_task_cb_ex(), do_rough_curve(), do_topology_rake_bmesh_task_cb_ex(), draw_main_line(), drw_shgroup_bone_envelope(), dyntopo_detail_size_sample_from_surface(), dyntopo_detail_size_update_from_mouse_delta(), ED_slider_factor_set(), EEVEE_depth_of_field_init(), EEVEE_lookdev_init(), filter_blackman_harris(), float_to_half_safe(), GEO_uv_parametrizer_average(), gpencil_brush_strength_apply(), gpencil_layer_final_tint_and_alpha_get(), GPENCIL_render_init(), IMB_gpu_clamp_half_float(), blender::eevee::Film::init(), loopcut_modal(), mask_filter_task_cb(), mesh_filter_surface_smooth_displace_task_cb(), mesh_filter_task_cb(), MOD_solidify_extrude_modifyMesh(), paint_cursor_draw_main_inactive_cursor(), paint_draw_3D_view_inactive_brush_cursor(), propagate_linear_data_delta(), radial_control_modal(), scrollbar_keep_scrolling(), scrollbar_set_thumbpos(), scrollbar_start_scrolling(), SCULPT_bmesh_topology_rake(), SCULPT_do_clay_thumb_brush(), SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex(), sculpt_expand_colors_update_task_cb(), sculpt_expand_mask_update_task_cb(), SCULPT_surface_smooth_displace_step(), seq_give_frame_index(), blender::nodes::node_shader_clamp_cc::sh_node_clamp_build_multi_function(), slider_update_factor(), smootherstep(), ui_colorpicker_small_wheel_cb(), ui_do_but_COLOR(), ui_do_but_HSVCIRCLE(), ui_hsvcircle_pos_from_vals(), UI_view2d_dot_grid_draw(), view_zoom_to_window_xy_camera(), view_zoomdrag_invoke(), view_zoomdrag_modal(), voxel_size_edit_draw(), voxel_size_edit_modal(), workbench_antialiasing_draw_pass(), and workbench_shadow_data_update().

◆ clamp_i()

MINLINE int clamp_i ( int  value,
int  min,
int  max 
)

◆ clamp_z()

MINLINE size_t clamp_z ( size_t  value,
size_t  min,
size_t  max 
)

Definition at line 624 of file math_base_inline.c.

References max, max_zz(), min, and min_zz().

◆ compare_ff()

MINLINE int compare_ff ( float  a,
float  b,
float  max_diff 
)

◆ compare_ff_relative()

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

Parameters
max_diffis the maximum absolute difference (allows to take care of the near-zero area, where relative difference methods cannot really work).
max_ulpsis the 'maximum number of floats + 1' allowed between a and b to consider them equal.
See also
https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/

Definition at line 634 of file math_base_inline.c.

References Freestyle::a, blender::math::abs(), usdtokens::b(), BLI_assert, and fabsf.

Referenced by apply_objects_internal(), compare_v2_classify(), compare_v2v2_relative(), compare_v3v3_relative(), compare_v4v4_relative(), fcurve_is_changed(), mesh_calc_eigen_matrix(), blender::tests::TEST(), and vfont_to_curve().

◆ compare_threshold_relative()

MINLINE bool compare_threshold_relative ( float  value1,
float  value2,
float  thresh 
)

Definition at line 656 of file math_base_inline.c.

References fabsf.

Referenced by customdata_compare().

◆ cube_d()

MINLINE double cube_d ( double  a)

Definition at line 475 of file math_base_inline.c.

References Freestyle::a.

◆ cube_f()

MINLINE float cube_f ( float  a)

◆ cube_i()

MINLINE int cube_i ( int  a)

Definition at line 455 of file math_base_inline.c.

References Freestyle::a.

◆ cube_s()

MINLINE int cube_s ( short  a)

Definition at line 450 of file math_base_inline.c.

References Freestyle::a.

◆ cube_uchar()

MINLINE int cube_uchar ( unsigned char  a)

Definition at line 465 of file math_base_inline.c.

References Freestyle::a.

◆ cube_uint()

MINLINE unsigned int cube_uint ( unsigned int  a)

Definition at line 460 of file math_base_inline.c.

References Freestyle::a.

◆ divide_ceil_u()

MINLINE uint divide_ceil_u ( uint  a,
uint  b 
)

◆ divide_ceil_ul()

MINLINE uint64_t divide_ceil_ul ( uint64_t  a,
uint64_t  b 
)

Definition at line 373 of file math_base_inline.c.

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

Referenced by ceil_to_multiple_ul().

◆ divide_round_i()

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 349 of file math_base_inline.c.

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

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

◆ double_round()

double double_round ( double  x,
int  ndigits 
)
Parameters
ndigitsmust be between 0 and 21.

Definition at line 27 of file math_base.c.

References fabs(), CCL_NAMESPACE_BEGIN::isfinite(), pow(), x, y, and z.

Referenced by bc_sanitize_v3(), Color_to_tuple_ex(), Euler_to_tuple_ex(), Quaternion_to_tuple_ext(), BCMatrix::sanitize(), and Vector_to_tuple_ex().

◆ floor_power_of_10()

float floor_power_of_10 ( float  f)

Floor to the nearest power of 10, e.g.:

  • 15.0 -> 10.0
  • 0.015 -> 0.01
  • 1.0 -> 1.0
Parameters
fValue to floor, must be over 0.0.
Note
If we wanted to support signed values we could if this becomes necessary.

Definition at line 64 of file math_base.c.

References BLI_assert, ceilf, and powf.

Referenced by blender::tests::TEST().

◆ integer_digits_d()

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 717 of file math_base_inline.c.

References fabs(), and blender::math::floor().

Referenced by unit_as_string(), and unit_as_string_split_pair().

◆ integer_digits_f()

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 712 of file math_base_inline.c.

References fabs(), and blender::math::floor().

Referenced by ui_but_string_get_ex().

◆ integer_digits_i()

MINLINE int integer_digits_i ( int  i)

◆ interpd()

MINLINE double interpd ( double  a,
double  b,
double  t 
)

◆ interpf()

MINLINE float interpf ( float  a,
float  b,
float  t 
)

Definition at line 154 of file math_base_inline.c.

Referenced by apply_stroke_envelope(), applyCurveShrinkFatten(), applyGPOpacity(), applyGPShrinkFatten(), applyMaskShrinkFatten(), blender::compositor::area(), BKE_curveprofile_evaluate_length_portion(), BKE_gpencil_stroke_close(), BKE_gpencil_stroke_subdivide(), BKE_gpencil_stroke_uniform_subdivide(), BKE_pchan_bbone_spline_compute(), blend_to_default_fcurve(), blend_to_neighbor_fcurve_segment(), bm_decim_edge_collapse(), breakdown_fcurve_segment(), brush_draw_apply(), build_concurrent(), build_sequential(), calc_min_radius_v3v3(), computeBindWeights(), create_samples_even_spacing(), data_transfer_interp_float_do(), deformStroke(), duplicateStroke(), ElementResize(), evaluate_time_fmodifiers(), evaluate_value_fmodifiers(), fade_stroke_points(), fcurve_eval_samples(), get_weight(), gpencil_add_new_points(), gpencil_brush_angle(), gpencil_brush_angle_segment(), gpencil_editcurve_subdivide_curve_segment(), gpencil_interpolate_fl_from_to(), gpencil_interpolate_update_points(), gpencil_smooth_buffer(), gpencil_smooth_segment(), gpencil_stroke_newfrombuffer(), gpencil_stroke_subdivide(), gpencil_stroke_to_bezier(), gpencil_stroke_to_path(), gpencil_subdivide_stroke(), gpencil_vertex_group_smooth_exec(), imm_draw_circle_partial(), imm_draw_circle_partial_3d(), imm_draw_disk_partial(), imm_draw_disk_partial_3d(), insert_bezt_to_nurb(), insert_bp_to_nurb(), interp_slerp_co_no_v3(), lineart_chain_create_crossing_point(), lineart_shadow_edge_cut(), MOD_lineart_chain_feature_lines(), paint_smooth_stroke(), blender::compositor::sample_bilinear_horizontal(), blender::compositor::sample_bilinear_vertical(), SCULPT_do_multiplane_scrape_brush(), splineik_evaluate_bone(), stretchto_evaluate(), stroke_elem_interp(), stroke_interpolate_deform_weights(), stroke_march_next_point(), subdivide_base(), subdividenurb(), table_sample(), uiAlignPanelStep(), update_timestep(), and weight_set_exec().

◆ is_power_of_2_i()

MINLINE int is_power_of_2_i ( int  n)

◆ log2_ceil_u()

MINLINE unsigned int log2_ceil_u ( unsigned int  x)

Definition at line 246 of file math_base_inline.c.

References is_power_of_2_i(), log2_floor_u(), and x.

Referenced by dof_reduce_pass_init(), and blender::tests::TEST().

◆ log2_floor_u()

MINLINE unsigned int log2_floor_u ( unsigned int  x)

◆ max_cc()

MINLINE char max_cc ( char  a,
char  b 
)

Definition at line 603 of file math_base_inline.c.

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

◆ max_dd()

MINLINE double max_dd ( double  a,
double  b 
)

Definition at line 522 of file math_base_inline.c.

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

◆ max_ff()

MINLINE float max_ff ( float  a,
float  b 
)

Definition at line 486 of file math_base_inline.c.

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

Referenced by alpha_circle_mask(), alpha_clip_aniso(), annotation_draw_stroke_2d(), annotation_draw_stroke_3d(), annotation_draw_stroke_buffer(), apply_heights_callback(), bake_ibuf_normalize_displacement(), barycentric_weights_v2_clamped(), BB_expand(), BB_expand_with_bb(), 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_fcurve_calc_bounds(), BKE_fcurve_calc_range(), BKE_fcurves_calc_keyed_frames_ex(), BKE_mask_spline_feather_resolution(), BKE_maskrasterize_handle_sample(), BKE_mesh_remap_calc_polys_from_mesh(), BKE_tracking_marker_clamp_search_size(), BKE_tracking_max_distortion_delta_across_bound(), 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(), BLI_bvhtree_new(), BLI_convexhull_aabb_fit_hull_2d(), blinn_specular(), blo_do_versions_300(), block_align_proximity_compute(), bm_edge_seg_isect(), BM_face_splits_check_legal(), brightcontrast_apply_threaded(), brush_edit_apply(), brush_influence_calc(), button2d_geom_draw_backdrop(), calc_action_range(), calc_bbox(), calc_bevfac_mapping(), calc_point_weight_by_distance(), calc_tw_center(), calculate_autoscale_factor(), calculate_collision_balls(), ccd_mesh_make(), ccd_mesh_update(), clamp_nonzero(), clipUVData(), cloth_collision_response_static(), cloth_record_result(), cloth_selfcollision_response_static(), computeBindWeights(), create_display_buffer_processor(), curvemap_make_table(), damptrack_do_transform(), deformStroke(), dirty_mask_compute_range_reduce(), dirty_mask_compute_range_task_cb(), dist_signed_squared_to_corner_v3v3v3(), do_grab_brush_task_cb_ex(), do_multires_bake(), do_sub_effect_float(), do_versions_sequencer_speed_effect_recursive(), do_vert_pair(), draw_fcurve_curve(), draw_horizontal_scale_indicators(), draw_seq_fcurve_overlay(), draw_seq_strip(), draw_seq_waveform_overlay(), drawLine(), DRW_globals_update(), drw_shgroup_bone_envelope(), DRW_view_create_with_zoffset(), 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_uvedit_pack_islands_multi(), ED_view3d_polygon_offset(), edbm_bevel_init(), edbm_bevel_modal(), edbm_inset_init(), edbm_inset_modal(), EDBM_preselect_edgering_draw(), EEVEE_bloom_init(), EEVEE_depth_of_field_init(), eevee_light_setup(), EEVEE_lightprobes_cube_data_from_object(), EEVEE_lightprobes_grid_data_from_object(), EEVEE_lightprobes_planar_data_from_object(), EEVEE_lights_cache_finish(), EEVEE_occlusion_init(), EEVEE_render_init(), EEVEE_shadows_cascade_add(), EEVEE_shadows_cube_add(), EEVEE_shadows_cube_setup(), EEVEE_volumes_init(), ElementResize(), blender::compositor::KeyingClipOperation::execute_pixel(), blender::compositor::BrightnessOperation::execute_pixel_sampled(), blender::compositor::ConvertHSVToRGBOperation::execute_pixel_sampled(), blender::compositor::ConvertHSLToRGBOperation::execute_pixel_sampled(), freetypechar_to_vchar(), blender::gpu::MTLContext::generate_sampler_from_state(), get_keyframe_extents(), get_nlastrip_extents(), gizmo_bbone_offset_set(), gpencil_buffer_add_point(), gpencil_draw_stroke_3d(), gpencil_fill_modal(), gpencil_session_init_fill(), gpencil_stroke_normalize_exec(), gpencil_vertexpaint_brightness_contrast_exec(), gpencil_vfx_shadow(), gpencil_vfx_wave(), gpencil_zoom_level_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(), image_camera_background_matrix_get(), imagewraposa(), imagewraposa_aniso(), IMB_colormanagement_setup_glsl_draw_from_space(), blender::compositor::BufferLineAccumulator< fxu, fxv, fyu, fyv >::init_buffer_iterator(), blender::compositor::GaussianAlphaBlurBaseOperation::init_data(), blender::compositor::GaussianBlurBaseOperation::init_data(), blender::compositor::ProjectorLensDistortionOperation::init_data(), blender::compositor::GaussianAlphaXBlurOperation::init_execution(), blender::compositor::GaussianAlphaYBlurOperation::init_execution(), blender::compositor::GaussianXBlurOperation::init_execution(), blender::compositor::GaussianYBlurOperation::init_execution(), blender::ed::sculpt_paint::paint::image::init_triangle_brush_test(), interp_weights_poly_v2(), interp_weights_poly_v3(), isect_seg_seg_v2_point_ex(), label_rect_init(), layer_bucket_init(), light_attenuation_radius_get(), light_shape_parameters_set(), long_edge_queue_edge_add_recursive(), loopcut_modal(), make_box_union(), max_fff(), max_ffff(), max_v3_v3v3(), meshdeform_ray_tree_intersect(), MOD_solidify_extrude_modifyMesh(), modifyMesh(), mouse_on_crns(), move_segment(), nearest_world_tree(), neighbor_dirty_mask(), blender::ed::space_node::node_update_hidden(), normalization_factor_get(), object_rand_transverts(), object_warp_transverts_minmax_x(), offset_meet(), OVERLAY_bounds(), OVERLAY_gpencil_cache_init(), OVERLAY_grid_init(), OVERLAY_light_cache_populate(), P(), paint_cursor_context_init(), paint_space_stroke_spacing(), paint_stroke_new(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step(), pchan_culling_test_envelope(), polyedge_beauty_cost_update_single(), py_bvhtree_overlap(), quad_calc_error(), radial_control_invoke(), RE_GetCameraWindowWithOverscan(), blender::io::usd::USDCameraReader::read_object_data(), blender::io::alembic::AbcCameraReader::readObjectData(), recalc_face_normals_find_index(), rgb_to_cpack(), RNA_property_float_ui_range(), scan_for_ext_face_forces(), sculpt_brush_dynamic_size_get(), SCULPT_brush_test_cube(), sculpt_expand_mask_update_task_cb(), sculpt_expand_modal(), sculpt_expand_update_max_face_falloff_factor(), sculpt_expand_update_max_vert_falloff_value(), sculpt_gesture_trim_calculate_depth(), sculpt_mask_by_color_final_mask_get(), sculpt_update_cache_invariants(), sequencer_main_clamp_view(), SimpleDeformModifier_do(), smart_uv_project_calculate_project_normals(), smooth_view_rect_to_fac(), smoothminf(), snap_to_superellipsoid(), softbody_apply_forces(), softbody_step(), sphclassical_calc_dens(), splineik_evaluate_bone(), spot_angle_fit_single_face(), 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(), svd_m4(), tonemapmodifier_apply(), tonemapmodifier_apply_threaded_simple(), track_mouse_area(), tracking_check_marker_margin(), blender::io::obj::transform_object(), 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_menu_scroll_apply_offset_y(), ui_numedit_begin(), ui_numedit_but_NUM(), ui_popup_block_position(), ui_tooltip_create_with_data(), blender::ed::sculpt_paint::update_curve_mask(), blender::compositor::ProjectorLensDistortionOperation::update_dispersion(), blender::compositor::ConvertHSVToRGBOperation::update_memory_buffer_partial(), blender::compositor::ConvertHSLToRGBOperation::update_memory_buffer_partial(), blender::compositor::BrightnessOperation::update_memory_buffer_partial(), v3d_cursor_plane_draw(), vertex_color_brightness_contrast_exec(), vgroup_normalize(), view3d_from_minmax(), view3d_localview_init(), view3d_zoom_border_exec(), blender::ed::space_node::viewer_border_exec(), viewzoom_scale_value(), voronoi_finishEdge(), voronoi_getXOfEdge(), blender::noise::voronoi_smooth_f1(), waveform_append_sample(), widget_scroll(), WIDGETGROUP_empty_image_refresh(), wm_software_cursor_draw_crosshair(), WM_window_set_dpi(), workbench_cavity_data_update(), workbench_volume_modifier_cache_populate(), workbench_volume_object_cache_populate(), wrapped_lighting(), wval_screen(), and zspan_scanconvert().

◆ max_fff()

MINLINE float max_fff ( float  a,
float  b,
float  c 
)

◆ max_ffff()

MINLINE float max_ffff ( float  a,
float  b,
float  c,
float  d 
)

◆ max_ii()

MINLINE int max_ii ( int  a,
int  b 
)

Definition at line 531 of file math_base_inline.c.

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

Referenced by accessor_get_ibuf(), blender::eevee::RenderBuffers::acquire(), actionzone_modal(), blender::gpu::MTLFrameBuffer::add_color_attachment(), blender::gpu::MTLFrameBuffer::add_depth_attachment(), add_face_constraints(), blender::gpu::MTLFrameBuffer::add_stencil_attachment(), animviz_calc_motionpaths(), annotation_draw_eraser(), apply_stroke_envelope(), area_move_set_limits(), azone_clipped_rect_calc(), blender::ed::space_node::best_socket_input(), bevel_build_cutoff(), 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_loops_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), BKE_mesh_validate_material_indices(), BKE_nurb_order_clamp_u(), BKE_nurb_order_clamp_v(), BKE_pbvh_build_grids(), 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_from_screenshot(), BLI_bitmap_draw_2d_poly_v2i_n(), BLI_ghash_calc_quality_ex(), BLI_rcti_do_minmax_rcti(), 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(), calc_radius_limit(), calculate_autoscale_factor(), change_spacing_exec(), check_seq_need_thumbnails(), circle_select_exec(), clamp_i(), clip_set_scene_frames_exec(), cloth_record_result(), colorband_init_from_table_rgba_simple(), console_copy_exec(), cp_cu_key(), create_primitive_from_points(), createTransSeqData(), curve_decimate_exec(), curvemap_buttons_layout(), CurveProfile_buttons_layout(), deformStroke(), displayed_channel_range_get(), do_sub_effect_byte(), do_text_effect(), dof_reduce_pass_init(), dopesheet_view_all_exec(), blender::ed::space_node::draw_background_color(), draw_current_frame(), draw_geometry_execute(), draw_seq_fcurve_overlay(), draw_seq_strips(), draw_seq_timeline_channels(), draw_spline_curve(), drawmeta_contents(), drop_named_material_invoke(), DRW_cache_gpencil_sbuffer_stroke_data_get(), DRW_curve_material_count_get(), DRW_curves_material_count_get(), DRW_curves_update(), DRW_gpencil_material_count_get(), DRW_hair_update(), DRW_metaball_material_count_get(), DRW_pointcloud_material_count_get(), DRW_volume_material_count_get(), ED_curve_editfont_select_pick(), ED_gpencil_brush_draw_eraser(), ED_info_draw_stats(), ED_object_ot_drop_named_material_tooltip(), ed_preview_draw_rect(), ED_sculpt_face_sets_find_next_available_id(), ED_view3d_backbuf_sample_size_clamp(), ED_view3d_depth_read_cached(), ED_view3d_update_viewmat(), EEVEE_lightbake_update_world_quick(), EEVEE_lightprobes_cache_finish(), eevee_lightprobes_extract_from_cache(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_init(), EEVEE_render_init(), eevee_render_to_image(), EEVEE_screen_raytrace_init(), EEVEE_shadows_update(), EEVEE_temporal_sampling_sample_count_get(), EEVEE_volumes_init(), blender::compositor::GaussianAlphaXBlurOperation::execute_pixel(), blender::compositor::GaussianAlphaYBlurOperation::execute_pixel(), blender::compositor::GaussianBokehBlurOperation::execute_pixel(), blender::compositor::GaussianXBlurOperation::execute_pixel(), blender::compositor::GaussianYBlurOperation::execute_pixel(), file_smoothscroll_invoke(), filelist_file_cache_block(), generate_geometry(), gesture_box_apply_rect(), get_active_fcurve_keyframe_edit(), blender::ed::space_node::get_main_socket(), blender::gpu::GLShaderInterface::GLShaderInterface(), gpencil_buffer_add_stroke(), gpencil_draw_eraser(), gpencil_draw_strokes(), gpencil_erase_processed_area(), gpencil_material_pool_create(), gpencil_render_offscreen(), gpencil_stroke_normalize_exec(), gpencil_vfx_blur(), gpencil_vfx_glow(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpu_batch_preset_panel_drag_widget(), GPU_offscreen_create(), gpu_texture_create_tile_array(), gpu_texture_update_from_ibuf(), image_sample_apply(), image_view_all(), IMB_create_gpu_texture(), implicit_needed_branches(), blender::gpu::Texture::init_2D(), blender::gpu::Texture::init_cubemap(), blender::gpu::GLTexture::init_internal(), initSnapping(), irradiance_pool_size_get(), blender::bke::image::partial_update::PartialUpdateRegisterImpl::limit_history(), lineart_gpencil_generate(), M_Geometry_interpolate_bezier(), make_edges_mdata_extend(), blender::bke::image::partial_update::TileChangeset::mark_region(), 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_meshcache_calc_range(), motion_path_cache(), motion_path_get_frame_range_to_draw(), motionpath_calculate_update_range(), motionpath_get_global_framerange(), blender::ed::space_node::node_socket_calculate_height(), outliner_data_api_buttons_start_x(), panel_calculate_size_recursive(), pipe_adj_vmesh(), planar_pool_ensure_alloc(), prefetch_data_fn(), preview_prepare_scene(), psys_get_pointcache_start_end(), psys_thread_context_init_path(), pygpu_texture__tp_new(), radial_control_invoke(), blender::gpu::FrameBuffer::recursive_downsample(), region_rect_recursive(), RNA_property_int_ui_range(), screen_animation_step_invoke(), sculpt_expand_modal(), sculpt_face_sets_randomize_colors_exec(), seq_cache_cleanup_sequence(), SEQ_render_give_ibuf(), SEQ_render_thumbnails_guaranteed_set_frame_step_get(), seq_snap_target_points_build(), seq_time_effect_range_set(), SEQ_time_update_meta_strip_range(), SEQ_transform_seqbase_shuffle_ex(), seq_update_meta_disp_range(), seq_update_sound_bounds_recursive_impl(), seq_view_collection_rect_timeline(), sequencer_all_free_anim_ibufs(), sequencer_drop_copy(), sequencer_export_subtitles_exec(), sequencer_image_seq_get_minmax_frame(), sequencer_meta_make_exec(), sequencer_select_side_exec(), sequencer_set_range_to_strips_exec(), set_profile_spacing(), shuffle_seq_time_offset_get(), SIM_hair_volume_add_segment(), blender::eevee::VelocityModule::step_swap(), svd_m4(), task_parallel_calc_chunk_size(), text_scroll_state_init(), textview_draw_sel(), trace_start_job(), tracking_dopesheet_calc_coverage(), tracking_dopesheet_channels_segments_calc(), 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_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(), uiItemFullR(), uilist_prepare(), uiTemplateReportsBanner(), uiTemplateStatusInfo(), unit_as_string_split_pair(), blender::compositor::GaussianAlphaBlurBaseOperation::update_memory_buffer_partial(), blender::compositor::GaussianBlurBaseOperation::update_memory_buffer_partial(), blender::compositor::GaussianBokehBlurOperation::update_memory_buffer_partial(), blender::gpu::MTLTexture::update_sub(), widget_scroll(), wm_main_playanim_intern(), WM_window_set_dpi(), workbench_cavity_samples_ubo_ensure(), workbench_cavity_total_sample_count(), workbench_dof_cache_init(), workbench_dof_engine_init(), workbench_draw_scene(), workbench_render(), workbench_shadow_object_shadow_distance(), ww_open_zstd(), blender::compositor::zbuf_fill_in_rgba(), and zspan_scanconvert().

◆ max_iii()

MINLINE int max_iii ( int  a,
int  b,
int  c 
)

◆ max_iiii()

MINLINE int max_iiii ( int  a,
int  b,
int  c,
int  d 
)

Definition at line 585 of file math_base_inline.c.

References Freestyle::a, usdtokens::b(), Freestyle::c, max_ii(), and max_iii().

Referenced by _bli_array_iter_spiral_square().

◆ max_uu()

MINLINE uint max_uu ( uint  a,
uint  b 
)

◆ max_zz()

MINLINE size_t max_zz ( size_t  a,
size_t  b 
)

Definition at line 594 of file math_base_inline.c.

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

Referenced by clamp_z().

◆ min_cc()

MINLINE char min_cc ( char  a,
char  b 
)

Definition at line 599 of file math_base_inline.c.

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

◆ min_dd()

MINLINE double min_dd ( double  a,
double  b 
)

Definition at line 518 of file math_base_inline.c.

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

◆ min_ff()

MINLINE float min_ff ( float  a,
float  b 
)

Definition at line 482 of file math_base_inline.c.

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

Referenced by alpha_circle_mask(), annotation_draw_apply(), apply_heights_callback(), apply_stroke_envelope(), area_draw_azone_fullscreen(), blender::ed::space_node::backimage_fit_exec(), BB_expand(), BB_expand_with_bb(), bezier_clamp(), bezier_handle_calc_smooth_fcurve(), BKE_curvemapping_changed(), BKE_curvemapping_set_defaults(), BKE_curveprofile_move_point(), BKE_fcurve_calc_bounds(), BKE_fcurve_calc_range(), 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(), BLI_convexhull_aabb_fit_hull_2d(), blo_do_versions_270(), blo_do_versions_300(), bm_decim_build_edge_cost_single__topology(), bm_decim_build_edge_cost_single_squared__topology(), bm_edge_seg_isect(), bmo_create_uvsphere_exec(), bmo_dissolve_degenerate_exec(), bmo_dissolve_limit_exec(), boid_body(), button2d_geom_draw_backdrop(), calc_action_range(), calc_bevfac_mapping(), calc_radius_limit(), blender::compositor::calc_ray_shift(), calc_tw_center(), calctrackballvec(), calculate_autoscale_factor(), calculate_collision_balls(), ccd_mesh_make(), ccd_mesh_update(), channel_draw_context_init(), check_zone(), clamp_nonzero(), clip_view_calculate_view_selection(), clipUVData(), cloth_collision_response_static(), cloth_record_result(), cloth_selfcollision_response_static(), computeAngularWeight(), computeBindWeights(), convert_tree(), curvemap_make_table(), damptrack_do_transform(), dirty_mask_compute_range_reduce(), dirty_mask_compute_range_task_cb(), dist_signed_squared_to_corner_v3v3v3(), do_multires_bake(), do_projectpaint_thread(), do_snake_hook_brush_task_cb_ex(), doEdgeSlide(), downsample_planar(), draw_fcurve_curve(), draw_keylist_block_gpencil(), draw_marker_slide_zones(), draw_seq_fcurve_overlay(), draw_seq_in_view(), draw_seq_strip(), draw_seq_waveform_overlay(), dynamic_paint_effect_drip_cb(), dynamic_paint_effect_spread_cb(), ED_node_link_intersect_test(), ED_view3d_backbuf_sample_size_clamp(), ED_view3d_update_viewmat(), EEVEE_depth_of_field_init(), EEVEE_lightprobes_planar_data_from_object(), EEVEE_shadows_cube_setup(), EEVEE_volumes_init(), blender::compositor::VariableSizeBokehBlurOperation::execute_opencl(), blender::compositor::KeyingClipOperation::execute_pixel(), blender::compositor::LuminanceMatteOperation::execute_pixel_sampled(), blender::compositor::MixDarkenOperation::execute_pixel_sampled(), flyApply(), flyEvent(), geodesic_distance_propagate_across_triangle(), get_keyframe_extents(), get_nlastrip_extents(), get_shortest_pattern_side(), getArrowEndPoint(), gpencil_convert_layer_exec(), gpencil_fill_modal(), gpencil_session_init_fill(), gpencil_zoom_level_set(), gpu_texture_create_tile_array(), graph_key_shortest_dist(), image_camera_background_matrix_get(), image_view_all(), IMB_rectblend(), immDrawBorderCorners(), blender::compositor::GaussianAlphaBlurBaseOperation::init_data(), blender::compositor::GaussianBlurBaseOperation::init_data(), blender::compositor::ProjectorLensDistortionOperation::init_data(), blender::ed::sculpt_paint::paint::image::init_triangle_brush_test(), isect_seg_seg_v2_point_ex(), knife_snap_size(), layer_bucket_init(), light_shape_parameters_set(), line_rect_clip(), make_box_union(), blender::color::FloatTraits::max(), merge_frame_corners(), blender::color::FloatTraits::min(), min_fff(), min_ffff(), mix_normals(), MOD_solidify_extrude_modifyMesh(), modifyMesh(), move_segment(), nla_action_draw_keyframes(), blender::ed::space_node::node_update_basis(), normalization_factor_get(), object_warp_transverts_minmax_x(), OVERLAY_grid_init(), pipe_adj_vmesh(), quad_calc_error(), radial_control_invoke(), ramp_blend(), rgb_to_hsl(), rgb_to_hsv(), RNA_property_float_ui_range(), RVAddBitmaps_float(), RVIsolateHighlights_float(), blender::gpu::GLTexture::samplers_update(), sb_detect_edge_collisionCached(), scan_for_ext_face_forces(), scanfill(), SCULPT_brush_test_cube(), SCULPT_do_clay_brush(), sculpt_expand_initialize_from_face_set_boundary(), sculpt_expand_spherical_falloff_create(), sculpt_gesture_trim_calculate_depth(), sculpt_mask_by_color_final_mask_get(), seq_view_collection_rect_preview(), sequence_handle_size_get_clamped(), sequencer_main_clamp_view(), sequencer_view_all_preview_exec(), sima_zoom_set_from_bounds(), SimpleDeformModifier_do(), smooth_view_rect_to_fac(), smoothminf(), snap_to_superellipsoid(), softbody_apply_forces(), softbody_step(), sphclassical_calc_dens(), spline_under_mouse_get(), splineik_evaluate_bone(), spot_angle_fit_single_face(), stitch_island_calculate_edge_rotation(), stitch_island_calculate_vert_rotation(), stretchto_evaluate(), texture_value_blend(), blender::io::obj::transform_object(), 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_text_clip_middle_ex(), UI_tooltip_create_from_button_or_extra_icon(), ui_update_flexible_spacing(), unified_findnearest(), blender::compositor::ProjectorLensDistortionOperation::update_dispersion(), blender::compositor::MixDarkenOperation::update_memory_buffer_row(), uv_rip_single_from_loop(), view3d_center_camera_exec(), view3d_ruler_pick(), view_all_exec(), blender::ed::space_node::viewer_border_exec(), voronoi_finishEdge(), voronoi_getXOfEdge(), voxel_size_edit_modal(), walkApply(), walkEvent(), waveform_append_sample(), wval_blend(), wval_colordodge(), blender::compositor::zbuf_add_to_span(), zbuf_add_to_span(), and zspan_scanconvert().

◆ min_fff()

MINLINE float min_fff ( float  a,
float  b,
float  c 
)

◆ min_ffff()

MINLINE float min_ffff ( float  a,
float  b,
float  c,
float  d 
)

◆ min_ii()

MINLINE int min_ii ( int  a,
int  b 
)

Definition at line 527 of file math_base_inline.c.

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

Referenced by accessor_get_ibuf(), animviz_calc_motionpaths(), apply_stroke_envelope(), 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_keyblock_convert_to_mesh(), BKE_mask_spline_feather_collapse_inner_loops(), BKE_maskrasterize_handle_init(), BKE_mesh_orco_verts_get(), 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(), 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(), bm_mesh_verts_select_get_n(), bmo_bisect_plane_exec(), brush_painter_imbuf_partial_update(), brush_painter_mask_imbuf_partial_update(), calc_radius_limit(), calcknots(), calculate_autoscale_factor(), NURBSpline::calculate_knots(), blender::bke::curves::nurbs::calculate_knots(), check_seq_need_thumbnails(), check_zone(), clamp_i(), cloth_record_result(), colorband_init_from_table_rgba_simple(), console_copy_exec(), cp_cu_key(), createTransSeqData(), CurveProfile_buttons_layout(), do_add_effect_byte(), do_drop_effect_byte(), do_drop_effect_float(), blender::bke::pbvh::pixels::do_encode_pixels(), dof_dilate_tiles_pass_draw(), dopesheet_view_all_exec(), draw_movieclip_cache(), draw_seq_strips(), drawmeta_contents(), DRW_curves_update(), DRW_hair_update(), ED_region_header_layout(), ED_region_info_draw_multiline(), ED_region_panels_layout_ex(), ED_view3d_depth_read_cached(), edbm_fill_grid_prepare(), eevee_lightprobes_extract_from_cache(), blender::eevee::Sampling::end_sync(), euler_filter_perform_filter(), eval_table(), blender::compositor::GaussianAlphaXBlurOperation::execute_pixel(), blender::compositor::GaussianAlphaYBlurOperation::execute_pixel(), blender::compositor::GaussianBokehBlurOperation::execute_pixel(), blender::compositor::GaussianXBlurOperation::execute_pixel(), blender::compositor::GaussianYBlurOperation::execute_pixel(), file_draw_list(), filelist_file_cache_block(), generate_geometry(), gesture_box_apply_rect(), get_render_subsurf_level(), gpencil_buffer_add_stroke(), gpencil_vfx_blur(), gpencil_vfx_glow(), gpencil_vfx_rim(), gpencil_vfx_shadow(), GPU_batch_draw_advanced(), GPU_texture_size_with_limit(), gpu_texture_update_from_ibuf(), image_sample_apply(), 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::compositor::GaussianAlphaBlurBaseOperation::init_data(), blender::compositor::GaussianBlurBaseOperation::init_data(), blender::compositor::GaussianAlphaXBlurOperation::init_execution(), blender::compositor::GaussianAlphaYBlurOperation::init_execution(), blender::compositor::GaussianXBlurOperation::init_execution(), blender::compositor::GaussianYBlurOperation::init_execution(), blender::gpu::Texture::init_view(), irradiance_pool_size_get(), blender::bke::image::partial_update::TileChangeset::mark_region(), mathutils_matrix_col_get(), mathutils_matrix_col_set(), Matrix_to_NxN(), matrix_unit_internal(), mesh_render_data_mat_tri_len_bm_range_fn(), mesh_render_data_mat_tri_len_mesh_range_fn(), mesh_render_data_polys_sorted_build(), blender::color::ByteTraits::min(), min_iii(), min_iiii(), MOD_meshcache_calc_range(), motionpath_calculate_update_range(), motionpath_get_global_framerange(), multibuf(), blender::ed::space_node::node_update_basis(), non_recursive_bvh_div_nodes(), normalization_factor_get(), prefetch_get_final_frame(), psys_get_pointcache_start_end(), psys_tasks_create(), query_right_side_strips(), radial_control_invoke(), blender::gpu::FrameBuffer::recursive_downsample(), RNA_property_int_ui_range(), round_box__edges(), seq_cache_cleanup_sequence(), SEQ_render_thumbnails_guaranteed_set_frame_step_get(), seq_snap_target_points_build(), seq_time_effect_range_set(), SEQ_time_update_meta_strip_range(), seq_update_meta_disp_range(), seq_update_sound_bounds_recursive_impl(), seq_view_collection_rect_timeline(), sequencer_all_free_anim_ibufs(), sequencer_image_seq_get_minmax_frame(), sequencer_meta_make_exec(), sequencer_select_side_exec(), sequencer_set_range_to_strips_exec(), shuffle_seq_time_offset_get(), SIM_hair_volume_add_segment(), startConstraint(), svd_m4(), task_parallel_iterator_do(), textview_draw_sel(), tile_remove_exec(), track_init_markers(), tracking_dopesheet_calc_coverage(), ui_block_func_POPUP(), ui_but_drag_init(), ui_but_v3_get(), ui_but_v3_set(), 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::compositor::GaussianAlphaBlurBaseOperation::update_memory_buffer_partial(), blender::compositor::GaussianBlurBaseOperation::update_memory_buffer_partial(), blender::compositor::GaussianBokehBlurOperation::update_memory_buffer_partial(), blender::gpu::MTLBufferPool::update_memory_pools(), widget_draw_text(), widget_numbut_draw(), WM_modalkeymap_operator_items_to_string_buf(), WM_operator_properties_checker_interval(), wm_xr_session_action_test_bimanual(), workbench_antialiasing_sample_count_get(), workbench_antialiasing_setup(), workbench_cavity_total_sample_count(), blender::compositor::zbuf_fill_in_rgba(), and zspan_scanconvert().

◆ min_iii()

MINLINE int min_iii ( int  a,
int  b,
int  c 
)

◆ min_iiii()

MINLINE int min_iiii ( int  a,
int  b,
int  c,
int  d 
)

Definition at line 581 of file math_base_inline.c.

References Freestyle::a, usdtokens::b(), Freestyle::c, min_ii(), and min_iii().

Referenced by _bli_array_iter_spiral_square().

◆ min_uu()

MINLINE uint min_uu ( uint  a,
uint  b 
)

◆ min_zz()

MINLINE size_t min_zz ( size_t  a,
size_t  b 
)

◆ mod_i()

MINLINE int mod_i ( int  i,
int  n 
)

◆ pow2f()

MINLINE float pow2f ( float  x)

Definition at line 30 of file math_base_inline.c.

References x.

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::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical(), do_snake_hook_brush_task_cb_ex(), blender::draw::edituv_get_edituv_stretch_angle(), 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(), init_kelvinlet_grab(), kelvinlet_scale(), kelvinlet_twist(), mesh_filter_sharpen_init(), mesh_filter_task_cb(), 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_boundary_automasking_init(), sculpt_update_cache_paint_variants(), 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(), voxel_size_edit_modal(), and WM_gesture_lasso_modal().

◆ pow3f()

MINLINE float pow3f ( float  x)

◆ pow4f()

MINLINE float pow4f ( float  x)

◆ pow7f()

MINLINE float pow7f ( float  x)

Definition at line 46 of file math_base_inline.c.

References pow2f(), pow3f(), and x.

Referenced by sphclassical_force_cb().

◆ pow_i()

int pow_i ( int  base,
int  exp 
)

Definition at line 12 of file math_base.c.

References BLI_assert, exp(), and result.

Referenced by multires_create_grids_in_unsubdivided_base_mesh(), and paint_proj_new_stroke().

◆ power_of_2()

MINLINE float power_of_2 ( float  f)

Used for zoom values.

Definition at line 188 of file math_base_inline.c.

References ceil(), log(), M_LN2, and pow().

Referenced by clip_view_calculate_view_selection(), image_view_all(), sequencer_view_all_preview_exec(), and view_all_exec().

◆ power_of_2_max_i()

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 198 of file math_base_inline.c.

References is_power_of_2_i().

Referenced by checker_board_color_fill(), parse_alloc_ops(), and set_profile_spacing().

◆ power_of_2_max_u()

MINLINE unsigned int power_of_2_max_u ( unsigned int  x)

◆ power_of_2_min_i()

MINLINE int power_of_2_min_i ( int  n)

◆ power_of_2_min_u()

MINLINE unsigned int power_of_2_min_u ( unsigned int  x)

Definition at line 231 of file math_base_inline.c.

References x.

◆ ratiod()

MINLINE double ratiod ( double  min,
double  max,
double  pos 
)

◆ ratiof()

MINLINE float ratiof ( float  min,
float  max,
float  pos 
)

Definition at line 164 of file math_base_inline.c.

References max, min, and pos.

Referenced by build_sequential(), and lineart_chain_create_crossing_point().

◆ round_db_to_char()

MINLINE signed char round_db_to_char ( double  a)

Definition at line 302 of file math_base_inline.c.

References _round_db_impl, and Freestyle::a.

◆ round_db_to_char_clamp()

MINLINE signed char round_db_to_char_clamp ( double  a)

Definition at line 327 of file math_base_inline.c.

References _round_clamp_db_impl, and Freestyle::a.

◆ round_db_to_int()

MINLINE int round_db_to_int ( double  a)

Definition at line 306 of file math_base_inline.c.

References _round_db_impl, and Freestyle::a.

Referenced by BKE_scene_frame_snap_by_seconds().

◆ round_db_to_int_clamp()

MINLINE int round_db_to_int_clamp ( double  a)

Definition at line 335 of file math_base_inline.c.

References _round_clamp_db_impl, and Freestyle::a.

Referenced by ui_but_value_set().

◆ round_db_to_short()

MINLINE short round_db_to_short ( double  a)

Definition at line 304 of file math_base_inline.c.

References _round_db_impl, and Freestyle::a.

◆ round_db_to_short_clamp()

MINLINE short round_db_to_short_clamp ( double  a)

Definition at line 331 of file math_base_inline.c.

References _round_clamp_db_impl, and Freestyle::a.

Referenced by ui_but_value_set().

◆ round_db_to_uchar()

MINLINE unsigned char round_db_to_uchar ( double  a)

Definition at line 303 of file math_base_inline.c.

References _round_db_impl, and Freestyle::a.

◆ round_db_to_uchar_clamp()

MINLINE unsigned char round_db_to_uchar_clamp ( double  a)

Definition at line 329 of file math_base_inline.c.

References _round_clamp_db_impl, and Freestyle::a.

Referenced by ui_but_value_set().

◆ round_db_to_uint()

MINLINE unsigned int round_db_to_uint ( double  a)

Definition at line 307 of file math_base_inline.c.

References _round_db_impl, and Freestyle::a.

◆ round_db_to_uint_clamp()

MINLINE unsigned int round_db_to_uint_clamp ( double  a)

Definition at line 336 of file math_base_inline.c.

References _round_clamp_db_impl, Freestyle::a, and UINT_MAX.

◆ round_db_to_ushort()

MINLINE unsigned short round_db_to_ushort ( double  a)

Definition at line 305 of file math_base_inline.c.

References _round_db_impl, and Freestyle::a.

◆ round_db_to_ushort_clamp()

MINLINE unsigned short round_db_to_ushort_clamp ( double  a)

Definition at line 333 of file math_base_inline.c.

References _round_clamp_db_impl, and Freestyle::a.

◆ round_fl_to_char()

MINLINE signed char round_fl_to_char ( float  a)

Definition at line 295 of file math_base_inline.c.

References _round_fl_impl, and Freestyle::a.

◆ round_fl_to_char_clamp()

MINLINE signed char round_fl_to_char_clamp ( float  a)

Definition at line 315 of file math_base_inline.c.

References _round_clamp_fl_impl, and Freestyle::a.

◆ round_fl_to_int()

MINLINE int round_fl_to_int ( float  a)

Definition at line 299 of file math_base_inline.c.

References _round_fl_impl, and Freestyle::a.

Referenced by actkeys_framejump_exec(), 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(), draw_background(), draw_current_frame(), 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_markers_find_nearest_marker_time(), ED_markers_post_apply_transform(), ED_region_panel_category_gutter_calc_rect(), file_draw_list(), file_draw_string(), flushTransIntFrameActionData(), flushTransSeq(), frame_from_event(), gather_frames_to_render_for_adt(), gpu_batch_preset_panel_drag_widget(), graphkeys_framejump_exec(), graphkeys_previewrange_exec(), graphview_cursor_apply(), icon_draw_rect(), imagewraposa_aniso(), blender::compositor::BlurBaseOperation::init_data(), MOD_meshcache_calc_range(), nlaedit_previewrange_exec(), blender::ed::space_node::node_draw_hidden(), outliner_draw_overrides_rna_buts(), panel_draw_aligned_widgets(), pose_propagate_fcurve(), previewrange_define_exec(), seq_cache_thumbnail_cleanup(), seq_get_thumb_image_dimensions(), seq_get_uncached_thumbnail(), SEQ_render_thumbnails(), seq_snap_threshold_get_frame_distance(), sequencer_slip_modal(), sequencer_thumbnail_closest_guaranteed_frame_get(), transform_convert_sequencer_channel_clamp(), transform_snap_sequencer_calc(), 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_cb(), widget_draw_text(), widget_draw_text_icon(), wm_drag_imbuf_icon_height_get(), wm_drag_imbuf_icon_width_get(), and WM_event_drag_direction().

◆ round_fl_to_int_clamp()

MINLINE int round_fl_to_int_clamp ( float  a)

Definition at line 323 of file math_base_inline.c.

References _round_clamp_fl_impl, and Freestyle::a.

Referenced by ui_do_but_NUM().

◆ round_fl_to_short()

MINLINE short round_fl_to_short ( float  a)

◆ round_fl_to_short_clamp()

MINLINE short round_fl_to_short_clamp ( float  a)

Definition at line 319 of file math_base_inline.c.

References _round_clamp_fl_impl, and Freestyle::a.

◆ round_fl_to_uchar()

MINLINE unsigned char round_fl_to_uchar ( float  a)

Definition at line 296 of file math_base_inline.c.

References _round_fl_impl, and Freestyle::a.

Referenced by blender::color::ByteTraits::round().

◆ round_fl_to_uchar_clamp()

MINLINE unsigned char round_fl_to_uchar_clamp ( float  a)

◆ round_fl_to_uint()

MINLINE unsigned int round_fl_to_uint ( float  a)

Definition at line 300 of file math_base_inline.c.

References _round_fl_impl, and Freestyle::a.

◆ round_fl_to_uint_clamp()

MINLINE unsigned int round_fl_to_uint_clamp ( float  a)

Definition at line 324 of file math_base_inline.c.

References _round_clamp_fl_impl, Freestyle::a, and UINT_MAX.

◆ round_fl_to_ushort()

MINLINE unsigned short round_fl_to_ushort ( float  a)

Definition at line 298 of file math_base_inline.c.

References _round_fl_impl, and Freestyle::a.

◆ round_fl_to_ushort_clamp()

MINLINE unsigned short round_fl_to_ushort_clamp ( float  a)

Definition at line 321 of file math_base_inline.c.

References _round_clamp_fl_impl, and Freestyle::a.

◆ round_to_even()

MINLINE float round_to_even ( float  f)

Round to closest even number, halfway cases are rounded away from zero.

Definition at line 344 of file math_base_inline.c.

Referenced by blender::compositor::BlurBaseOperation::determine_canvas(), and blender::compositor::BokehBlurOperation::determine_canvas().

◆ saacos()

MINLINE float saacos ( float  fac)

◆ saacosf()

MINLINE float saacosf ( float  f)

◆ saasin()

MINLINE float saasin ( float  fac)

Definition at line 95 of file math_base_inline.c.

References asinf, M_PI_2, and UNLIKELY.

Referenced by angle_normalized_v2v2(), and angle_normalized_v3v3().

◆ saasinf()

MINLINE float saasinf ( float  f)

Definition at line 131 of file math_base_inline.c.

References asinf, M_PI_2, and UNLIKELY.

Referenced by quaternion_to_angles().

◆ sasqrt()

MINLINE float sasqrt ( float  fac)

Definition at line 108 of file math_base_inline.c.

References sqrtf, and UNLIKELY.

Referenced by blo_do_versions_300(), boid_body(), and boid_brain().

◆ sasqrtf()

MINLINE float sasqrtf ( float  f)

Definition at line 144 of file math_base_inline.c.

References sqrtf, and UNLIKELY.

◆ scalenorm()

MINLINE float scalenorm ( float  a,
float  b,
float  x 
)

◆ scalenormd()

MINLINE double scalenormd ( double  a,
double  b,
double  x 
)

Map a normalized value, i.e. from interval [0, 1] to interval [a, b].

Definition at line 182 of file math_base_inline.c.

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

◆ signf()

MINLINE float signf ( float  f)

◆ signum_i()

MINLINE int signum_i ( float  a)

◆ signum_i_ex()

MINLINE int signum_i_ex ( float  a,
float  eps 
)

Definition at line 686 of file math_base_inline.c.

References Freestyle::a, and eps.

Referenced by bm_edge_calc_rotate_beauty__area().

◆ sqrt3d()

MINLINE double sqrt3d ( double  d)

Definition at line 64 of file math_base_inline.c.

References exp(), log(), and UNLIKELY.

Referenced by solve_cubic().

◆ sqrt3f()

MINLINE float sqrt3f ( float  f)

Definition at line 51 of file math_base_inline.c.

References exp(), float(), log(), and UNLIKELY.

Referenced by ui_numedit_but_HSVCIRCLE().

◆ sqrtf_signed()

MINLINE float sqrtf_signed ( float  f)

Definition at line 77 of file math_base_inline.c.

References sqrtf.

Referenced by mesh_calc_eigen_matrix(), and modifyMesh().

◆ square_d()

MINLINE double square_d ( double  a)

Definition at line 443 of file math_base_inline.c.

References Freestyle::a.

◆ square_f()

MINLINE float square_f ( float  a)

Definition at line 438 of file math_base_inline.c.

References Freestyle::a.

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(), calc_duplicates_fast(), calctrackballvec(), cloth_collision_response_static(), cloth_selfcollision_response_static(), contarget_get_mesh_mat(), curve_draw_event_add(), curve_draw_exec_precalc(), curve_draw_modal(), deformStroke(), deformVerts_do(), dist_squared_ray_to_seg_v3(), draw_culling_sphere_test(), dynamic_paint_find_island_border(), ED_armature_from_edit(), EDBM_verts_mirror_cache_begin_ex(), eevee_light_setup(), EEVEE_lightbake_filter_diffuse(), EEVEE_lightbake_filter_glossy(), EEVEE_lightprobes_cache_finish(), EEVEE_lights_cache_finish(), execute_posetree(), gizmo_arrow_test_select(), gpencil_primitive_update_strokes(), gpencil_stroke_addpoint(), isect_seg_seg_v2_point_ex(), len_squared_vnvn(), long_edge_queue_edge_add_recursive(), mat4_to_dquat(), 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(), paint_smooth_stroke(), py_bvhtree_find_nearest_range(), blender::eevee::Sampling::sample_ball(), SCULPT_cloth_brush_affected_nodes_gather(), sculpt_pbvh_gather_generic(), sculpt_update_brush_delta(), seq_select_seq_from_preview(), snap_calc_uv_fn(), snap_mesh_edge_verts_mixed(), snap_mesh_polygon(), snap_object_center(), snapArmature(), snapCamera(), snapCurve(), snapEditMesh(), snapMesh(), sphere_normal_from_uv(), spline_under_mouse_get(), studiolight_spherical_harmonics_lambda_get(), ui_do_but_CURVE(), ui_do_but_CURVEPROFILE(), uv_find_nearest_edge(), uv_find_nearest_vert(), uv_image_outset(), v3d_cursor_plane_draw(), warpModifier_do(), workbench_cavity_data_update(), and workbench_taa_jitter_init_order().

◆ square_i()

MINLINE int square_i ( int  a)

◆ square_s()

MINLINE int square_s ( short  a)

Definition at line 418 of file math_base_inline.c.

References Freestyle::a.

Referenced by project_state_init().

◆ square_uchar()

MINLINE int square_uchar ( unsigned char  a)

Definition at line 433 of file math_base_inline.c.

References Freestyle::a.

◆ square_uint()

MINLINE unsigned int square_uint ( unsigned int  a)

Definition at line 428 of file math_base_inline.c.

References Freestyle::a.

Referenced by gpu_pbvh_grid_fill_index_buffers().

Variable Documentation

◆ NAN_INT

const int NAN_INT = 0x7FC00000
static

Definition at line 62 of file BLI_math_base.h.