vector: use xy members instead of 01 indices for cross
It's functionally identically, but is easier to read when comparing with maths documents.
This commit is contained in:
parent
c243261dda
commit
33816fab94
@ -66,7 +66,7 @@ namespace cruft {
|
||||
T
|
||||
cross (vector<2,T> a, vector<2,T> b)
|
||||
{
|
||||
return a[0] * b[1] - a[1] * b[0];
|
||||
return a.x * b.y - a.y * b.x;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user