diff options
Diffstat (limited to 'libdimensionxx/dimensionxx/geometry.hpp')
-rw-r--r-- | libdimensionxx/dimensionxx/geometry.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libdimensionxx/dimensionxx/geometry.hpp b/libdimensionxx/dimensionxx/geometry.hpp index 671e204..10cf452 100644 --- a/libdimensionxx/dimensionxx/geometry.hpp +++ b/libdimensionxx/dimensionxx/geometry.hpp @@ -283,6 +283,18 @@ namespace Dimension return r; } + inline double + norm(const Vector& v) + { + return dmnsn_vector_norm(v.dmnsn()); + } + + inline Vector + normalize(const Vector& v) + { + return Vector(dmnsn_vector_normalize(v.dmnsn())); + } + // Dot product inline double dot(const Vector& lhs, const Vector& rhs) |