Skip to content

Commit

Permalink
Remove some excess semi-colons
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazade committed Nov 14, 2013
1 parent 1cf0536 commit 92dc04f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 24 deletions.
8 changes: 8 additions & 0 deletions kazmath.files
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ kazmath/ray3.h
kazmath/ray3.c kazmath/ray3.c
tests/test_ray3.cpp tests/test_ray3.cpp
tests/test_vec3.cpp tests/test_vec3.cpp
kazmathxx/vec4.h
kazmathxx/vec3.h
kazmathxx/vec2.h
kazmathxx/quaternion.h
kazmathxx/plane.h
kazmathxx/mat4.h
kazmathxx/mat3.h
kazmathxx/aabb.h
4 changes: 2 additions & 2 deletions kazmathxx/mat3.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ namespace km
mat3 result; mat3 result;
kmMat3Multiply(&result, &lhs, &rhs); kmMat3Multiply(&result, &lhs, &rhs);
return result; return result;
}; }


///< Checks for equality (with a small threshold epsilon) ///< Checks for equality (with a small threshold epsilon)
inline const bool operator==(const mat3& lhs, const mat3& rhs) inline const bool operator==(const mat3& lhs, const mat3& rhs)
{ {
return kmMat3AreEqual(&lhs,&rhs); return kmMat3AreEqual(&lhs,&rhs);
}; }
} }
16 changes: 8 additions & 8 deletions kazmathxx/vec2.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ namespace km


inline const vec2 cross( const vec2& rhs ) inline const vec2 cross( const vec2& rhs )
{ {
kmVec2Cross( this, &rhs ) kmVec2Cross(this, &rhs);
return *this; return *this;
} }
}; };
Expand All @@ -153,51 +153,51 @@ namespace km
vec2 result; vec2 result;
kmVec2Add(&result, &lhs, &rhs); kmVec2Add(&result, &lhs, &rhs);
return result; return result;
}; }


///< Vector subtraction ///< Vector subtraction
inline const vec2 operator-(const vec2& lhs, const vec2& rhs) inline const vec2 operator-(const vec2& lhs, const vec2& rhs)
{ {
vec2 result; vec2 result;
kmVec2Subtract(&result, &lhs, &rhs); kmVec2Subtract(&result, &lhs, &rhs);
return result; return result;
}; }


///< Dot product - which is the cosine of the angle between the two vectors multiplied by their lengths ///< Dot product - which is the cosine of the angle between the two vectors multiplied by their lengths
inline const float operator*(const vec2& lhs, const vec2& rhs) inline const float operator*(const vec2& lhs, const vec2& rhs)
{ {
return kmVec2Dot(&lhs, &rhs); return kmVec2Dot(&lhs, &rhs);
}; }


///< Multiply with scalar ///< Multiply with scalar
inline const vec2 operator*(const kmScalar lhs, const vec2& rhs) inline const vec2 operator*(const kmScalar lhs, const vec2& rhs)
{ {
vec2 result; vec2 result;
kmVec2Scale(&result, &rhs, lhs); kmVec2Scale(&result, &rhs, lhs);
return result; return result;
}; }


///< Multiply with scalar ///< Multiply with scalar
inline const vec2 operator*(const vec2& lhs, const kmScalar rhs) inline const vec2 operator*(const vec2& lhs, const kmScalar rhs)
{ {
vec2 result; vec2 result;
kmVec2Scale(&result, &lhs, rhs); kmVec2Scale(&result, &lhs, rhs);
return result; return result;
}; }


///< Transform through matrix ///< Transform through matrix
inline const vec2 operator*(const kmMat3& lhs, const vec2& rhs) inline const vec2 operator*(const kmMat3& lhs, const vec2& rhs)
{ {
vec2 result; vec2 result;
kmVec2Transform(&result, &rhs, &lhs); kmVec2Transform(&result, &rhs, &lhs);
return result; return result;
}; }


///< Checks for equality (with a small threshold epsilon) ///< Checks for equality (with a small threshold epsilon)
inline const bool operator==(const vec2& lhs, const vec2& rhs) inline const bool operator==(const vec2& lhs, const vec2& rhs)
{ {
return (kmVec2AreEqual(&lhs,&rhs) != 0); return (kmVec2AreEqual(&lhs,&rhs) != 0);
}; }
} //end of namespace km } //end of namespace km


#endif #endif
Expand Down
14 changes: 7 additions & 7 deletions kazmathxx/vec3.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -182,51 +182,51 @@ namespace km
vec3 result; vec3 result;
kmVec3Add(&result, &lhs, &rhs); kmVec3Add(&result, &lhs, &rhs);
return result; return result;
}; }


///< Vector subtraction ///< Vector subtraction
inline const vec3 operator-(const vec3& lhs, const vec3& rhs) inline const vec3 operator-(const vec3& lhs, const vec3& rhs)
{ {
vec3 result; vec3 result;
kmVec3Subtract(&result, &lhs, &rhs); kmVec3Subtract(&result, &lhs, &rhs);
return result; return result;
}; }


///< Dot product - which is the cosine of the angle between the two vectors multiplied by their lengths ///< Dot product - which is the cosine of the angle between the two vectors multiplied by their lengths
inline const float operator*(const vec3& lhs, const vec3& rhs) inline const float operator*(const vec3& lhs, const vec3& rhs)
{ {
return kmVec3Dot(&lhs, &rhs); return kmVec3Dot(&lhs, &rhs);
}; }


///< Multiply with scalar ///< Multiply with scalar
inline const vec3 operator*(const kmScalar lhs, const vec3& rhs) inline const vec3 operator*(const kmScalar lhs, const vec3& rhs)
{ {
vec3 result; vec3 result;
kmVec3Scale(&result, &rhs, lhs); kmVec3Scale(&result, &rhs, lhs);
return result; return result;
}; }


///< Multiply with scalar ///< Multiply with scalar
inline const vec3 operator*(const vec3& lhs, const kmScalar rhs) inline const vec3 operator*(const vec3& lhs, const kmScalar rhs)
{ {
vec3 result; vec3 result;
kmVec3Scale(&result, &lhs, rhs); kmVec3Scale(&result, &lhs, rhs);
return result; return result;
}; }


///< Transform through matrix ///< Transform through matrix
inline const vec3 operator*(const kmMat4& lhs, const vec3& rhs) inline const vec3 operator*(const kmMat4& lhs, const vec3& rhs)
{ {
vec3 result; vec3 result;
kmVec3Transform(&result, &rhs, &lhs); kmVec3Transform(&result, &rhs, &lhs);
return result; return result;
}; }


///< Checks for equality (with a small threshold epsilon) ///< Checks for equality (with a small threshold epsilon)
inline const bool operator==(const vec3& lhs, const vec3& rhs) inline const bool operator==(const vec3& lhs, const vec3& rhs)
{ {
return (kmVec3AreEqual(&lhs,&rhs) != 0); return (kmVec3AreEqual(&lhs,&rhs) != 0);
}; }
} //end of namespace km } //end of namespace km


#endif #endif
Expand Down
14 changes: 7 additions & 7 deletions kazmathxx/vec4.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -158,51 +158,51 @@ namespace km
vec4 result; vec4 result;
kmVec4Add(&result, &lhs, &rhs); kmVec4Add(&result, &lhs, &rhs);
return result; return result;
}; }


///< Vector subtraction ///< Vector subtraction
inline const vec4 operator-(const vec4& lhs, const vec4& rhs) inline const vec4 operator-(const vec4& lhs, const vec4& rhs)
{ {
vec4 result; vec4 result;
kmVec4Subtract(&result, &lhs, &rhs); kmVec4Subtract(&result, &lhs, &rhs);
return result; return result;
}; }


///< Dot product - which is the cosine of the angle between the two vectors multiplied by their lengths ///< Dot product - which is the cosine of the angle between the two vectors multiplied by their lengths
inline const float operator*(const vec4& lhs, const vec4& rhs) inline const float operator*(const vec4& lhs, const vec4& rhs)
{ {
return kmVec4Dot(&lhs, &rhs); return kmVec4Dot(&lhs, &rhs);
}; }


///< Multiply with scalar ///< Multiply with scalar
inline const vec4 operator*(const kmScalar lhs, const vec4& rhs) inline const vec4 operator*(const kmScalar lhs, const vec4& rhs)
{ {
vec4 result; vec4 result;
kmVec4Scale(&result, &rhs, lhs); kmVec4Scale(&result, &rhs, lhs);
return result; return result;
}; }


///< Multiply with scalar ///< Multiply with scalar
inline const vec4 operator*(const vec4& lhs, const kmScalar rhs) inline const vec4 operator*(const vec4& lhs, const kmScalar rhs)
{ {
vec4 result; vec4 result;
kmVec4Scale(&result, &lhs, rhs); kmVec4Scale(&result, &lhs, rhs);
return result; return result;
}; }


///< Transform through matrix ///< Transform through matrix
inline const vec4 operator*(const kmMat4& lhs, const vec4& rhs) inline const vec4 operator*(const kmMat4& lhs, const vec4& rhs)
{ {
vec4 result; vec4 result;
kmVec4Transform(&result, &rhs, &lhs); kmVec4Transform(&result, &rhs, &lhs);
return result; return result;
}; }


///< Checks for equality (with a small threshold epsilon) ///< Checks for equality (with a small threshold epsilon)
inline const bool operator==(const vec4& lhs, const vec4& rhs) inline const bool operator==(const vec4& lhs, const vec4& rhs)
{ {
return (kmVec4AreEqual(&lhs,&rhs) != 0); return (kmVec4AreEqual(&lhs,&rhs) != 0);
}; }
} //end of namespace km } //end of namespace km


#endif #endif
Expand Down

0 comments on commit 92dc04f

Please sign in to comment.