Skip to content

Commit 51e7294

Browse files
committed
update
1 parent 9843ec1 commit 51e7294

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

PerlinNoise.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ namespace siv
9191

9292
double noise(double x, double y, double z) const
9393
{
94-
const std::int32_t X = static_cast<std::int32_t>(::floor(x)) & 255;
95-
const std::int32_t Y = static_cast<std::int32_t>(::floor(y)) & 255;
96-
const std::int32_t Z = static_cast<std::int32_t>(::floor(z)) & 255;
94+
const std::int32_t X = static_cast<std::int32_t>(std::floor(x)) & 255;
95+
const std::int32_t Y = static_cast<std::int32_t>(std::floor(y)) & 255;
96+
const std::int32_t Z = static_cast<std::int32_t>(std::floor(z)) & 255;
9797

9898
x -= ::floor(x);
9999
y -= ::floor(y);
@@ -109,11 +109,11 @@ namespace siv
109109
return lerp(w, lerp(v, lerp(u, grad(p[AA], x, y, z),
110110
grad(p[BA], x - 1, y, z)),
111111
lerp(u, grad(p[AB], x, y - 1, z),
112-
grad(p[BB], x - 1, y - 1, z))),
112+
grad(p[BB], x - 1, y - 1, z))),
113113
lerp(v, lerp(u, grad(p[AA + 1], x, y, z - 1),
114-
grad(p[BA + 1], x - 1, y, z - 1)),
115-
lerp(u, grad(p[AB + 1], x, y - 1, z - 1),
116-
grad(p[BB + 1], x - 1, y - 1, z - 1))));
114+
grad(p[BA + 1], x - 1, y, z - 1)),
115+
lerp(u, grad(p[AB + 1], x, y - 1, z - 1),
116+
grad(p[BB + 1], x - 1, y - 1, z - 1))));
117117
}
118118

119119
double octaveNoise(double x, std::int32_t octaves) const

0 commit comments

Comments
 (0)