Skip to content

Commit

Permalink
Add assert when out doesn't make sense in cross
Browse files Browse the repository at this point in the history
  • Loading branch information
dmah42 committed Mar 25, 2013
1 parent 61b9144 commit 8dcc026
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/vector_math/vector.dart
Expand Up @@ -50,6 +50,7 @@ dynamic cross(dynamic x, dynamic y, [dynamic out=null]) {
if (x is vec3 && y is vec3) {
return x.cross(y, out);
} else if (x is vec2 && y is vec2) {
assert(out == null);
return x.cross(y);
} else if (x is num && y is vec2) {
x = x.toDouble();
Expand Down

0 comments on commit 8dcc026

Please sign in to comment.