SHARE
TWEET

Untitled

a guest Jun 19th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top