Permalink
Browse files

Fixed spacing and parameters

  • Loading branch information...
1 parent f09f491 commit 674c7c05effc0f16979b58291800a02a99d9a9b9 @zeDoctor zeDoctor committed Feb 21, 2014
Showing with 18 additions and 18 deletions.
  1. +18 −18 gl3n/linalg.d
View
@@ -567,16 +567,16 @@ struct Vector(type, int dimension_) {
assert(almost_equal(v4.normalized, vec4(1.0f/sqrt(84.0f), 3.0f/sqrt(84.0f), 5.0f/sqrt(84.0f), 7.0f/sqrt(84.0f))));
}
- const int opCmp(ref const Vector!(type, dimension_) vec) const {
- foreach( i, a; vector ) {
- if( a < vec.vector[ i ] )
- return -1;
- else if( a > vec.vector[ i ] )
- return 1;
- }
+ const int opCmp(ref const Vector vec) const {
+ foreach(i, a; vector) {
+ if(a < vec.vector[ i ])
+ return -1;
+ else if(a > vec.vector[ i ])
+ return 1;
+ }
- // Vectors are the same
- return 0;
+ // Vectors are the same
+ return 0;
}
const bool opEquals(T)(const T vec) if(!isArray!T && T.dimension == dimension) {
@@ -2417,16 +2417,16 @@ struct Quaternion(type) {
assert((q2 * v1).vector == [-2.0f, 36.0f, 38.0f]);
}
- const int opCmp(ref const Quaternion!(type) qua) const {
- foreach( i, a; quaternion ) {
- if( a < qua.quaternion[ i ] )
- return -1;
- else if( a > qua.quaternion[ i ] )
- return 1;
- }
+ const int opCmp(ref const Quaternion qua) const {
+ foreach(i, a; quaternion) {
+ if(a < qua.quaternion[ i ])
+ return -1;
+ else if(a > qua.quaternion[ i ])
+ return 1;
+ }
- // Vectors are the same
- return 0;
+ // Quaternions are the same
+ return 0;
}
bool opEquals(const Quaternion qu) const {

0 comments on commit 674c7c0

Please sign in to comment.