Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. pub fn lerp<T,Ratio,Diff>((start,end):(T,T), fraction:Ratio)->T
  2. where
  3. T:Copy,
  4. T:Sub<T,Output=Diff>,
  5. T:Madd<Diff,Ratio>,
  6. Diff:Mul<Ratio>+Copy
  7. {
  8. start.madd(end-start,fraction)
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement