Skip to content

Commit

Permalink
Update README.md: Fix typos + types in examples (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
guyguy2001 authored Apr 23, 2024
1 parent 87f4bd1 commit d484c5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ struct MyXAxisLens {
end: f32,
}

impl Lens<Tranform> for MyXAxisLens {
fn lerp(&self, target: &mut Tranform, ratio: f32) -> f32 {
impl Lens<Transform> 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;
Expand Down Expand Up @@ -212,7 +212,7 @@ struct MyCustomLens {
}

impl Lens<MyCustomComponent> 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;
}
}
Expand Down

0 comments on commit d484c5a

Please sign in to comment.