Blender V4.3
Basic.c File Reference
#include "Basic.h"

Go to the source code of this file.

Functions

int min_i (int a, int b)
 
int max_i (int a, int b)
 
int clamp_i (int val, int min, int max)
 
float min_f (float a, float b)
 
float max_f (float a, float b)
 
float clamp_f (float val, float min, float max)
 
void rect_copy (int dst[2][2], int src[2][2])
 
int rect_contains_pt (int rect[2][2], int pt[2])
 
int rect_width (int rect[2][2])
 
int rect_height (int rect[2][2])
 

Function Documentation

◆ clamp_f()

float clamp_f ( float val,
float min,
float max )

Definition at line 28 of file Basic.c.

References max, max_f(), min, and min_f().

Referenced by blender::apply_color_factor(), apply_sculpt_data_constraints(), 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_bmvert_copy_from_vert_interp(), blender::nodes::node_shader_tex_brick_cc::BrickFunction::brick(), butterworth_calculate_blend_value(), blender::eevee::calc_level_of_detail(), blender::nodes::node_shader_mix_rgb_cc::MixRGBFunction::call(), blender::eevee::Sampling::cdf_invert(), blender::ed::sculpt_paint::expand::colors_update_task(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::compute_chromatic_distortion(), blender::compositor::TimeNode::convert_to_operations(), blender::bke::pbvh::pixels::Rows::determine_mix_factor(), do_clump_level(), blender::bke::pbvh::pixels::do_encode_pixels(), do_rough_curve(), draw_main_line(), draw_seq_waveform_overlay(), drw_shgroup_bone_envelope(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_sample_from_surface(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_update_from_mouse_delta(), ED_slider_factor_set(), blender::nodes::node_composite_time_curves_cc::TimeCurveOperation::execute(), blender::workbench::filter_blackman_harris(), float_to_half_safe(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::get_dispersion(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::get_distortion(), get_seq_strip_thumbnails(), gizmo_spot_blend_prop_matrix_set(), gpencil_layer_final_tint_and_alpha_get(), GPENCIL_render_init(), grease_pencil_layer_final_tint_and_alpha_get(), IMB_gpu_clamp_half_float(), blender::eevee::Film::init(), blender::workbench::ShadowPass::init(), blender::ed::seq::init_wave_table(), blender::workbench::SceneResources::load_jitter_tx(), loopcut_modal(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), blender::geometry::p_abf_adjust_alpha(), blender::ed::sculpt_paint::paint_cursor_draw_main_inactive_cursor(), blender::ed::sculpt_paint::paint_draw_3D_view_inactive_brush_cursor(), radial_control_modal(), blender::ed::seq::rgb_to_uv_normalized(), rotlimit_evaluate(), scrollbar_keep_scrolling(), scrollbar_set_thumbpos(), scrollbar_start_scrolling(), SEQ_give_frame_index(), blender::nodes::node_shader_clamp_cc::sh_node_clamp_build_multi_function(), shader_node_disconnect_inactive_mix_branch(), blender::ed::object::shape_key_clear_exec(), slider_update_factor(), smootherstep(), blender::eevee::DepthOfField::sync(), blender::workbench::AntiAliasingPass::sync(), ui_colorpicker_wheel_cb(), ui_do_but_COLOR(), ui_do_but_HSVCIRCLE(), ui_hsvcircle_pos_from_vals(), UI_view2d_dot_grid_draw(), blender::ed::sculpt_paint::expand::update_mask_bmesh(), blender::ed::sculpt_paint::expand::update_mask_grids(), blender::geometry::uv_parametrizer_average(), vfont_to_curve(), view_zoom_to_window_xy_camera(), view_zoomdrag_invoke(), view_zoomdrag_modal(), blender::ed::object::voxel_size_edit_draw(), and blender::ed::object::voxel_size_edit_modal().

◆ clamp_i()

◆ max_f()

float max_f ( float a,
float b )

Definition at line 24 of file Basic.c.

References b.

Referenced by clamp_f().

◆ max_i()

int max_i ( int a,
int b )

Definition at line 11 of file Basic.c.

References b.

Referenced by clamp_i(), clip_uv_transform_rotate(), clip_uv_transform_shear(), rand_range_i(), and sel_to_copy_ints().

◆ min_f()

float min_f ( float a,
float b )

Definition at line 20 of file Basic.c.

References b.

Referenced by clamp_f().

◆ min_i()

int min_i ( int a,
int b )

Definition at line 7 of file Basic.c.

References b.

Referenced by clamp_i(), loggerwindow_do_draw(), rand_range_i(), and update_cut_data_for_nurb().

◆ rect_contains_pt()

int rect_contains_pt ( int rect[2][2],
int pt[2] )

Definition at line 38 of file Basic.c.

Referenced by scrollbar_contains_pt().

◆ rect_copy()

void rect_copy ( int dst[2][2],
int src[2][2] )

Definition at line 33 of file Basic.c.

Referenced by scrollbar_get_rect(), scrollbar_set_rect(), and ui_draw_widget_back_color().

◆ rect_height()

int rect_height ( int rect[2][2])

◆ rect_width()

int rect_width ( int rect[2][2])