From d484c5a6c2d62a5fb5526ab3dc0720d533080668 Mon Sep 17 00:00:00 2001 From: guyguy2001 Date: Tue, 23 Apr 2024 21:18:18 +0300 Subject: [PATCH] Update README.md: Fix typos + types in examples (#123) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c7df6e5..9840e64 100644 --- a/README.md +++ b/README.md @@ -180,8 +180,8 @@ struct MyXAxisLens { end: f32, } -impl Lens for MyXAxisLens { - fn lerp(&self, target: &mut Tranform, ratio: f32) -> f32 { +impl Lens for MyXAxisLens { + fn lerp(&mut self, target: &mut Transform, ratio: f32) { let start = Vec3::new(self.start, 0., 0.); let end = Vec3::new(self.end, 0., 0.); target.translation = start + (end - start) * ratio; @@ -212,7 +212,7 @@ struct MyCustomLens { } impl Lens for MyCustomLens { - fn lerp(&self, target: &mut MyCustomComponent, ratio: f32) -> f32 { + fn lerp(&mut self, target: &mut MyCustomComponent, ratio: f32) { target.0 = self.start + (self.end - self.start) * ratio; } }