Guest User

Untitled

a guest
Jun 18th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. pub fn cross2d<T>(a: &[T;2], b: &[T;2], c: &[T;2]) -> T where
  2. for<'a> &'a T: RefNum<T>,
  3. T: Num {
  4.  
  5. return (&b[0]-&a[0]) * (&c[1]-&a[1]) - (&b[1]-&a[1]) * (&c[0]-&a[0]);
  6. }
Add Comment
Please, Sign In to add comment