Clippy
This commit is contained in:
@@ -147,7 +147,7 @@ fn inv_lerp(v0: f32, v1: f32, a: f32) -> f32 {
|
||||
pub trait CoordTransformer<I: Into<(f32, f32)> + From<(f32, f32)>> {
|
||||
fn origin(&self) -> I;
|
||||
fn extremes(&self) -> I;
|
||||
fn to_coords(&self, pos: I) -> (f32, f32) {
|
||||
fn xform(&self, pos: I) -> (f32, f32) {
|
||||
let (sx, sy) = self.origin().into();
|
||||
let (ex, ey) = self.extremes().into();
|
||||
let (x, y) = pos.into();
|
||||
@@ -156,7 +156,7 @@ pub trait CoordTransformer<I: Into<(f32, f32)> + From<(f32, f32)>> {
|
||||
inv_lerp(sy, ey, y),
|
||||
)
|
||||
}
|
||||
fn from_coords(&self, x: f32, y: f32) -> I {
|
||||
fn inv_xform(&self, x: f32, y: f32) -> I {
|
||||
let (sx, sy) = self.origin().into();
|
||||
let (ex, ey) = self.extremes().into();
|
||||
(lerp(sx, ex, x), lerp(sy, ey, y)).into()
|
||||
|
||||
Reference in New Issue
Block a user