From 1a4fb182dd0a0da03372a7163cc9596295de49e7 Mon Sep 17 00:00:00 2001 From: Daniel Girardeau-Montaut Date: Sun, 30 Jun 2024 20:08:43 +0200 Subject: [PATCH] Syntax fix --- include/CCGeom.h | 4 ++-- include/SquareMatrix.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/CCGeom.h b/include/CCGeom.h index e76c46c..2a0a5b4 100644 --- a/include/CCGeom.h +++ b/include/CCGeom.h @@ -53,7 +53,7 @@ template class Vector2Tpl //! Returns vector norm (forces double precision output) inline double normd() const { return std::sqrt(norm2d()); } //! Sets vector norm to unity - inline void normalize() { double n = normd(); if (n >= std::numeric_limits::epsilon()) *this /= static_cast(n); } + inline void normalize() { Type n = norm(); if (n >= std::numeric_limits::epsilon()) *this /= n; } //! Dot product inline Type dot(const Vector2Tpl& v) const { return (x*v.x) + (y*v.y); } @@ -201,7 +201,7 @@ template class Vector3Tpl : public Tuple3Tpl //! Returns vector norm (forces double precision output) inline double normd() const { return std::sqrt(norm2d()); } //! Sets vector norm to unity - inline void normalize() { double n = normd(); if (n >= std::numeric_limits::epsilon()) *this /= static_cast(n); } + inline void normalize() { Type n = norm(); if (n >= std::numeric_limits::epsilon()) *this /= n; } //! Returns a normalized vector which is orthogonal to this one inline Vector3Tpl orthogonal() const { Vector3Tpl ort; vorthogonal(u, ort.u); return ort; } diff --git a/include/SquareMatrix.h b/include/SquareMatrix.h index 9b80089..0ac5ee4 100644 --- a/include/SquareMatrix.h +++ b/include/SquareMatrix.h @@ -127,13 +127,13 @@ namespace CCCoreLib inline Scalar* row(unsigned index) { return m_values[index]; } //! Sets a particular matrix value - void inline setValue(unsigned row, unsigned column, Scalar value) + inline void setValue(unsigned row, unsigned column, Scalar value) { m_values[row][column] = value; } //! Returns a specific matrix value - Scalar inline getValue(unsigned row, unsigned column) const + inline Scalar getValue(unsigned row, unsigned column) const { return m_values[row][column]; }