Module smart_
aim
emath
0.31.1
Module smart_
aim
Module Items
Constants
Functions
In crate emath
Modules
align
easing
gui_rounding
history
numeric
ordered_float
pos2
range
rect
rect_transform
rot2
smart_aim
ts_transform
vec2
vec2b
Macros
impl_num_ext
Structs
History
OrderedFloat
Pos2
Rangef
Rect
RectTransform
Rot2
TSTransform
Vec2
Vec2b
Constants
GUI_ROUNDING
Traits
Float
GuiRounding
NumExt
Numeric
One
Real
Functions
almost_equal
ease_in_ease_out
exponential_smooth_factor
format_with_decimals_in_range
format_with_minimum_decimals
interpolation_factor
inverse_lerp
lerp
normalized_angle
pos2
remap
remap_clamp
round_to_decimals
vec2
emath
Module
smart_aim
Copy item path
Settings
Help
Summary
Source
Expand description
Find “simple” numbers is some range. Used by sliders.
Constants
§
NUM_
DECIMALS
🔒
Functions
§
best_
in_
range_
f64
Find the “simplest” number in a closed range [min, max], i.e. the one with the fewest decimal digits.
from_
decimal_
string
🔒
is_
integer
🔒
simplest_
digit_
closed_
range
🔒
Find the simplest integer in the range [min, max]
to_
decimal_
string
🔒