SDLPP: formatting, make compileable on Linux
This commit is contained in:
@@ -6,24 +6,22 @@
|
||||
#include <cmath>
|
||||
|
||||
namespace SDLPP {
|
||||
template<typename T>
|
||||
double vecDotProduct( const Vec2D<T> &a, const Vec2D<T> &b ) {
|
||||
template < typename T >
|
||||
double vecDotProduct( const Vec2D< T > &a, const Vec2D< T > &b ) {
|
||||
return a * b;
|
||||
}
|
||||
template<typename T>
|
||||
double vecLengthSquared( const Vec2D<T> &vec ) {
|
||||
template < typename T > double vecLengthSquared( const Vec2D< T > &vec ) {
|
||||
return vecDotProduct( vec, vec );
|
||||
}
|
||||
template<typename T>
|
||||
double vecLength( const Vec2D<T> &vec ) {
|
||||
template < typename T > double vecLength( const Vec2D< T > &vec ) {
|
||||
return std::sqrt( vecLengthSquared( vec ) );
|
||||
}
|
||||
template<typename T>
|
||||
double vecDistanceSquared( const Vec2D<T> &a, const Vec2D<T> &b ) {
|
||||
template < typename T >
|
||||
double vecDistanceSquared( const Vec2D< T > &a, const Vec2D< T > &b ) {
|
||||
return vecLengthSquared( a - b );
|
||||
}
|
||||
template<typename T>
|
||||
double vecDistance( const Vec2D<T> &a, const Vec2D<T> &b ) {
|
||||
template < typename T >
|
||||
double vecDistance( const Vec2D< T > &a, const Vec2D< T > &b ) {
|
||||
return vecLength( a - b );
|
||||
}
|
||||
} // namespace SDLPP
|
||||
|
||||
Reference in New Issue
Block a user