Improve math module (#396)
* Improve math module - Mark almost everything constexpr - Equality (a == b) is now exact, down to the bit level. If you want approximate equality use the new ApproxEqual method/static method - Rename Nz::Extend to Nz::Extent - Removed Make[] and Set[] methods in favor of their static counterpart and operator=
This commit is contained in:
@@ -300,7 +300,7 @@ namespace Nz
|
||||
|
||||
inline void Node::SetInitialPosition(float positionX, float positionY, float positionZ, Invalidation invalidation)
|
||||
{
|
||||
m_initialPosition.Set(positionX, positionY, positionZ);
|
||||
m_initialPosition = Vector3f(positionX, positionY, positionZ);
|
||||
|
||||
Invalidate(invalidation);
|
||||
}
|
||||
@@ -321,14 +321,14 @@ namespace Nz
|
||||
|
||||
inline void Node::SetInitialScale(float scale, Invalidation invalidation)
|
||||
{
|
||||
m_initialScale.Set(scale);
|
||||
m_initialScale = Vector3f(scale);
|
||||
|
||||
Invalidate(invalidation);
|
||||
}
|
||||
|
||||
inline void Node::SetInitialScale(float scaleX, float scaleY, float scaleZ, Invalidation invalidation)
|
||||
{
|
||||
m_initialScale.Set(scaleX, scaleY, scaleZ);
|
||||
m_initialScale = Vector3f(scaleX, scaleY, scaleZ);
|
||||
|
||||
Invalidate(invalidation);
|
||||
}
|
||||
|
||||
@@ -170,12 +170,11 @@ namespace Nz
|
||||
|
||||
inline void RichTextDrawer::ClearGlyphs() const
|
||||
{
|
||||
m_bounds.MakeZero();
|
||||
m_bounds = Rectf::Zero(); //< Compute bounds as float to speedup bounds computation (as casting between floats and integers is costly)
|
||||
m_lastSeparatorGlyph = InvalidGlyph;
|
||||
m_lines.clear();
|
||||
m_glyphs.clear();
|
||||
m_glyphUpdated = true;
|
||||
m_bounds.MakeZero(); //< Compute bounds as float to speedup bounds computation (as casting between floats and integers is costly)
|
||||
}
|
||||
|
||||
inline void RichTextDrawer::ConnectFontSlots()
|
||||
|
||||
Reference in New Issue
Block a user