Created
June 16, 2018 19:59
-
-
Save boustrophedon/da761820bb10d999e5773bd71a9a801a to your computer and use it in GitHub Desktop.
refnum usage?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn cross2d<T>(a: &[T;2], b: &[T;2], c: &[T;2]) -> T where | |
for<'a> &'a T: RefNum<T>, | |
T: Num { | |
return (&b[0]-&a[0]) * (&c[1]-&a[1]) - (&b[1]-&a[1]) * (&c[0]-&a[0]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment