Skip to content

Commit

Permalink
removed the =float operator from Vec4
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacey committed Sep 27, 2023
1 parent 9cd9264 commit 8c2fe07
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
6 changes: 0 additions & 6 deletions include/ngl/Vec4.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,6 @@ class NGL_DLLEXPORT Vec4
//----------------------------------------------------------------------------------------------------------------------
Vec4 &operator=(const Vec3 &_v) noexcept;

//----------------------------------------------------------------------------------------------------------------------
/// @brief assignment operator set the current vector to rhs
/// @param[in] _v the vector to set
/// @returns a new vector
//----------------------------------------------------------------------------------------------------------------------
Vec4 &operator=(Real _v) noexcept;

//----------------------------------------------------------------------------------------------------------------------
/// @brief negate the vector components
Expand Down
8 changes: 0 additions & 8 deletions src/Vec4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,6 @@ Vec4 &Vec4::operator=(const Vec3 &_v) noexcept
return *this;
}

Vec4 &Vec4::operator=(Real _v) noexcept
{
m_x = _v;
m_y = _v;
m_z = _v;
m_w = 0.0f;
return *this;
}

Real Vec4::lengthSquared() const noexcept
{
Expand Down
1 change: 1 addition & 0 deletions tests/Vec3Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ TEST(Vec3, AssignOperator)
EXPECT_FLOAT_EQ(test[0], copy[0]);
EXPECT_FLOAT_EQ(test[1], copy[1]);
EXPECT_FLOAT_EQ(test[2], copy[2]);

}

TEST(Vec3, fromGLM)
Expand Down

0 comments on commit 8c2fe07

Please sign in to comment.