Skip to content

Commit

Permalink
Implements lerp.
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix "xq" Queißner committed Sep 8, 2021
1 parent 8ce5645 commit 5c8c2d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zlm-generic.zig
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ pub fn specializeOn(comptime Real: type) type {
}
return result;
}

pub fn lerp(a: Self, b: Self, f: f32) Self {
return a.add(b.sub(a).scale(f));
}
};
}

Expand Down

0 comments on commit 5c8c2d4

Please sign in to comment.