Blender  V3.3
Functions
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 27 of file Basic.c.

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

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

int clamp_i ( int  val,
int  min,
int  max 
)

◆ max_f()

float max_f ( float  a,
float  b 
)

Definition at line 23 of file Basic.c.

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

Referenced by clamp_f().

◆ max_i()

int max_i ( int  a,
int  b 
)

Definition at line 10 of file Basic.c.

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

Referenced by BKE_gpencil_stroke_simplify_adaptive(), clamp_i(), and rand_range_i().

◆ min_f()

float min_f ( float  a,
float  b 
)

Definition at line 19 of file Basic.c.

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

Referenced by clamp_f().

◆ min_i()

int min_i ( int  a,
int  b 
)

Definition at line 6 of file Basic.c.

References Freestyle::a, and usdtokens::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 37 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 32 of file Basic.c.

References src.

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