Use exact value comparison in caching related functions

(cherry picked from commit 9d7c6b26422e127719836944d8d473910190e7d4)
This commit is contained in:
2025-04-18 18:45:48 +03:00
parent 8986290b12
commit f09fd7ad34
51 changed files with 119 additions and 120 deletions

View File

@@ -260,7 +260,7 @@ void Terrain::SetScaleInLightmap(float value)
void Terrain::SetBoundsExtent(const Vector3& value)
{
if (Vector3::NearEqual(_boundsExtent, value))
if (_boundsExtent == value)
return;
_boundsExtent = value;
@@ -891,7 +891,7 @@ void Terrain::OnTransformChanged()
auto patch = _patches[i];
patch->UpdateTransform();
}
if (!Float3::NearEqual(_cachedScale, _transform.Scale))
if (_cachedScale != _transform.Scale)
{
_cachedScale = _transform.Scale;
for (int32 i = 0; i < _patches.Count(); i++)