#[repr(C)]pub struct Mathf {}Expand description
Implementations§
Source§impl Mathf
impl Mathf
Sourcepub fn next_power_of_two(value: impl Into<i32>) -> i32
pub fn next_power_of_two(value: impl Into<i32>) -> i32
NextPowerOfTwo(i32) overload
Sourcepub fn gamma_to_linear_space(value: impl Into<f32>) -> f32
pub fn gamma_to_linear_space(value: impl Into<f32>) -> f32
GammaToLinearSpace(f32) overload
Sourcepub fn linear_to_gamma_space(value: impl Into<f32>) -> f32
pub fn linear_to_gamma_space(value: impl Into<f32>) -> f32
LinearToGammaSpace(f32) overload
Sourcepub fn float_to_half(val: impl Into<f32>) -> u16
pub fn float_to_half(val: impl Into<f32>) -> u16
FloatToHalf(f32) overload
Sourcepub fn perlin_noise(x: impl Into<f32>, y: impl Into<f32>) -> f32
pub fn perlin_noise(x: impl Into<f32>, y: impl Into<f32>) -> f32
PerlinNoise(f32, f32) overload
Sourcepub fn ceil_to_int(f: impl Into<f32>) -> i32
pub fn ceil_to_int(f: impl Into<f32>) -> i32
CeilToInt(f32) overload
Sourcepub fn floor_to_int(f: impl Into<f32>) -> i32
pub fn floor_to_int(f: impl Into<f32>) -> i32
FloorToInt(f32) overload
Sourcepub fn round_to_int(f: impl Into<f32>) -> i32
pub fn round_to_int(f: impl Into<f32>) -> i32
RoundToInt(f32) overload
Sourcepub fn clamp(
value: impl Into<f32>,
min: impl Into<f32>,
max: impl Into<f32>,
) -> f32
pub fn clamp( value: impl Into<f32>, min: impl Into<f32>, max: impl Into<f32>, ) -> f32
Clamp(f32, f32, f32) overload
Sourcepub fn clamp_2(
value: impl Into<i32>,
min: impl Into<i32>,
max: impl Into<i32>,
) -> i32
pub fn clamp_2( value: impl Into<i32>, min: impl Into<i32>, max: impl Into<i32>, ) -> i32
Clamp(i32, i32, i32) overload
Sourcepub fn lerp(a: impl Into<f32>, b: impl Into<f32>, t: impl Into<f32>) -> f32
pub fn lerp(a: impl Into<f32>, b: impl Into<f32>, t: impl Into<f32>) -> f32
Lerp(f32, f32, f32) overload
Sourcepub fn lerp_unclamped(
a: impl Into<f32>,
b: impl Into<f32>,
t: impl Into<f32>,
) -> f32
pub fn lerp_unclamped( a: impl Into<f32>, b: impl Into<f32>, t: impl Into<f32>, ) -> f32
LerpUnclamped(f32, f32, f32) overload
Sourcepub fn lerp_angle(
a: impl Into<f32>,
b: impl Into<f32>,
t: impl Into<f32>,
) -> f32
pub fn lerp_angle( a: impl Into<f32>, b: impl Into<f32>, t: impl Into<f32>, ) -> f32
LerpAngle(f32, f32, f32) overload
Sourcepub fn move_towards(
current: impl Into<f32>,
target: impl Into<f32>,
max_delta: impl Into<f32>,
) -> f32
pub fn move_towards( current: impl Into<f32>, target: impl Into<f32>, max_delta: impl Into<f32>, ) -> f32
MoveTowards(f32, f32, f32) overload
Sourcepub fn move_towards_angle(
current: impl Into<f32>,
target: impl Into<f32>,
max_delta: impl Into<f32>,
) -> f32
pub fn move_towards_angle( current: impl Into<f32>, target: impl Into<f32>, max_delta: impl Into<f32>, ) -> f32
MoveTowardsAngle(f32, f32, f32) overload
Sourcepub fn approximately(a: impl Into<f32>, b: impl Into<f32>) -> bool
pub fn approximately(a: impl Into<f32>, b: impl Into<f32>) -> bool
Approximately(f32, f32) overload
Sourcepub fn smooth_damp(
current: impl Into<f32>,
target: impl Into<f32>,
smooth_time: impl Into<f32>,
) -> (f32, f32)
pub fn smooth_damp( current: impl Into<f32>, target: impl Into<f32>, smooth_time: impl Into<f32>, ) -> (f32, f32)
SmoothDamp(f32, f32, *mutf32, f32) overload
Sourcepub fn smooth_damp_2(
current: impl Into<f32>,
target: impl Into<f32>,
smooth_time: impl Into<f32>,
max_speed: impl Into<f32>,
delta_time: impl Into<f32>,
) -> (f32, f32)
pub fn smooth_damp_2( current: impl Into<f32>, target: impl Into<f32>, smooth_time: impl Into<f32>, max_speed: impl Into<f32>, delta_time: impl Into<f32>, ) -> (f32, f32)
SmoothDamp(f32, f32, *mutf32, f32, f32, f32) overload
Sourcepub fn smooth_damp_angle(
current: impl Into<f32>,
target: impl Into<f32>,
smooth_time: impl Into<f32>,
) -> (f32, f32)
pub fn smooth_damp_angle( current: impl Into<f32>, target: impl Into<f32>, smooth_time: impl Into<f32>, ) -> (f32, f32)
SmoothDampAngle(f32, f32, *mutf32, f32) overload
Sourcepub fn smooth_damp_angle_2(
current: impl Into<f32>,
target: impl Into<f32>,
smooth_time: impl Into<f32>,
max_speed: impl Into<f32>,
delta_time: impl Into<f32>,
) -> (f32, f32)
pub fn smooth_damp_angle_2( current: impl Into<f32>, target: impl Into<f32>, smooth_time: impl Into<f32>, max_speed: impl Into<f32>, delta_time: impl Into<f32>, ) -> (f32, f32)
SmoothDampAngle(f32, f32, *mutf32, f32, f32, f32) overload
Sourcepub fn inverse_lerp(
a: impl Into<f32>,
b: impl Into<f32>,
value: impl Into<f32>,
) -> f32
pub fn inverse_lerp( a: impl Into<f32>, b: impl Into<f32>, value: impl Into<f32>, ) -> f32
InverseLerp(f32, f32, f32) overload
Sourcepub fn delta_angle(current: impl Into<f32>, target: impl Into<f32>) -> f32
pub fn delta_angle(current: impl Into<f32>, target: impl Into<f32>) -> f32
DeltaAngle(f32, f32) overload
Source§impl Mathf
impl Mathf
pub fn next_power_of_two_method_info() -> &'static MethodInfo
pub fn gamma_to_linear_space_method_info() -> &'static MethodInfo
pub fn linear_to_gamma_space_method_info() -> &'static MethodInfo
pub fn float_to_half_method_info() -> &'static MethodInfo
pub fn perlin_noise_method_info() -> &'static MethodInfo
pub fn sin_method_info() -> &'static MethodInfo
pub fn cos_method_info() -> &'static MethodInfo
pub fn tan_method_info() -> &'static MethodInfo
pub fn asin_method_info() -> &'static MethodInfo
pub fn acos_method_info() -> &'static MethodInfo
pub fn atan_method_info() -> &'static MethodInfo
pub fn atan2_method_info() -> &'static MethodInfo
pub fn sqrt_method_info() -> &'static MethodInfo
pub fn abs_method_info() -> &'static MethodInfo
pub fn abs_2_method_info() -> &'static MethodInfo
pub fn min_method_info() -> &'static MethodInfo
pub fn min_2_method_info() -> &'static MethodInfo
pub fn min_3_method_info() -> &'static MethodInfo
pub fn max_method_info() -> &'static MethodInfo
pub fn max_2_method_info() -> &'static MethodInfo
pub fn max_3_method_info() -> &'static MethodInfo
pub fn max_4_method_info() -> &'static MethodInfo
pub fn pow_method_info() -> &'static MethodInfo
pub fn exp_method_info() -> &'static MethodInfo
pub fn log_method_info() -> &'static MethodInfo
pub fn log_2_method_info() -> &'static MethodInfo
pub fn ceil_method_info() -> &'static MethodInfo
pub fn floor_method_info() -> &'static MethodInfo
pub fn round_method_info() -> &'static MethodInfo
pub fn ceil_to_int_method_info() -> &'static MethodInfo
pub fn floor_to_int_method_info() -> &'static MethodInfo
pub fn round_to_int_method_info() -> &'static MethodInfo
pub fn sign_method_info() -> &'static MethodInfo
pub fn clamp_method_info() -> &'static MethodInfo
pub fn clamp_2_method_info() -> &'static MethodInfo
pub fn clamp01_method_info() -> &'static MethodInfo
pub fn lerp_method_info() -> &'static MethodInfo
pub fn lerp_unclamped_method_info() -> &'static MethodInfo
pub fn lerp_angle_method_info() -> &'static MethodInfo
pub fn move_towards_method_info() -> &'static MethodInfo
pub fn move_towards_angle_method_info() -> &'static MethodInfo
pub fn approximately_method_info() -> &'static MethodInfo
pub fn smooth_damp_method_info() -> &'static MethodInfo
pub fn smooth_damp_2_method_info() -> &'static MethodInfo
pub fn smooth_damp_angle_method_info() -> &'static MethodInfo
pub fn smooth_damp_angle_2_method_info() -> &'static MethodInfo
pub fn repeat_method_info() -> &'static MethodInfo
pub fn inverse_lerp_method_info() -> &'static MethodInfo
pub fn delta_angle_method_info() -> &'static MethodInfo
pub fn cctor_method_info() -> &'static MethodInfo
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mathf
impl RefUnwindSafe for Mathf
impl Send for Mathf
impl Sync for Mathf
impl Unpin for Mathf
impl UnwindSafe for Mathf
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)