float StandardTurbulence(float x, float y) { var scale = m_scale; var amplitude = 1.0f; var sum = 0.0f; for (var i = 0; i < m_octaves; i++) { var period = (float)scale * (float)m_outputElevationWidth; sum += amplitude * m_noise.GenerateSeamlessX(x * scale + m_xOffset, y * scale + m_yOffset, period); scale *= m_lacunarity; amplitude *= m_persistence; } return(sum * 0.5f + 0.5f); }