Fixed HybridMultiFractalXD

Former-commit-id: eb44374145b7c43012ae70de7a9224154d1a2985
This commit is contained in:
Lynix 2013-04-17 21:31:30 +02:00
parent 3e916c91f0
commit 3616a126b8
3 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ float NzHybridMultiFractal3D::GetValue(float x, float y, float z, float resoluti
resolution *= m_lacunarity;
}
m_remainder = std::floor(m_octaves);
m_remainder = m_octaves - static_cast<int>(m_octaves);
if (m_remainder > 0.f)
m_value += m_remainder * m_source->GetValue(x,y,z,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];

View File

@ -51,7 +51,7 @@ float NzHybridMultiFractal4D::GetValue(float x, float y, float z, float w, float
resolution *= m_lacunarity;
}
m_remainder = std::floor(m_octaves);
m_remainder = m_octaves - static_cast<int>(m_octaves);
if (m_remainder > 0.f)
m_value += m_remainder * m_source->GetValue(x,y,z,w,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];

View File

@ -51,7 +51,7 @@ float NzHybridMultiFractal2D::GetValue(float x, float y, float resolution)
resolution *= m_lacunarity;
}
m_remainder = std::floor(m_octaves);
m_remainder = m_octaves - static_cast<int>(m_octaves);
if (m_remainder > 0.f)
m_value += m_remainder * m_source->GetValue(x,y,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];