#ifndef SDLPP_HPP_GEOMETRY_VECTOR #define SDLPP_HPP_GEOMETRY_VECTOR #include "sdlpp_common.hpp" #include "sdlpp_vector.hpp" #include namespace SDLPP { template double vecDotProduct( const Vec2D &a, const Vec2D &b ) { return a * b; } template double vecLengthSquared( const Vec2D &vec ) { return vecDotProduct( vec, vec ); } template double vecLength( const Vec2D &vec ) { return std::sqrt( vecLengthSquared( vec ) ); } template double vecDistanceSquared( const Vec2D &a, const Vec2D &b ) { return vecLengthSquared( a - b ); } template double vecDistance( const Vec2D &a, const Vec2D &b ) { return vecLength( a - b ); } } // namespace SDLPP #endif