mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Fix a few nightly clippy lints (#8388)
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
//! Derived from <https://github.com/warrenm/AHEasing/blob/master/AHEasing/easing.c>.
|
||||
use std::f32::consts::PI;
|
||||
|
||||
use crate::fast_midpoint;
|
||||
|
||||
#[inline]
|
||||
fn powf(base: f32, exp: f32) -> f32 {
|
||||
base.powf(exp)
|
||||
@@ -116,7 +118,7 @@ pub fn circular_in_out(t: f32) -> f32 {
|
||||
if t < 0.5 {
|
||||
0.5 * (1. - (1. - 4. * t * t).sqrt())
|
||||
} else {
|
||||
0.5 * ((-(2. * t - 3.) * (2. * t - 1.)).sqrt() + 1.)
|
||||
fast_midpoint((-(2. * t - 3.) * (2. * t - 1.)).sqrt(), 1.)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use std::ops::{RangeFrom, RangeFull, RangeInclusive, RangeToInclusive};
|
||||
|
||||
use crate::fast_midpoint;
|
||||
|
||||
/// Inclusive range of floats, i.e. `min..=max`, but more ergonomic than [`RangeInclusive`].
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
@@ -52,7 +54,7 @@ impl Rangef {
|
||||
/// The center of the range
|
||||
#[inline]
|
||||
pub fn center(self) -> f32 {
|
||||
0.5 * (self.min + self.max)
|
||||
fast_midpoint(self.min, self.max)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user