@@ -324,7 +324,7 @@ float noise2d_perlin_abs(float x, float y, s32 seed,
324
324
float f = 1.0 ;
325
325
float g = 1.0 ;
326
326
for (int i = 0 ; i < octaves; i++) {
327
- a += g * fabs (noise2d_gradient (x * f, y * f, seed + i, eased));
327
+ a += g * std:: fabs (noise2d_gradient (x * f, y * f, seed + i, eased));
328
328
f *= 2.0 ;
329
329
g *= persistence;
330
330
}
@@ -354,7 +354,7 @@ float noise3d_perlin_abs(float x, float y, float z, s32 seed,
354
354
float f = 1.0 ;
355
355
float g = 1.0 ;
356
356
for (int i = 0 ; i < octaves; i++) {
357
- a += g * fabs (noise3d_gradient (x * f, y * f, z * f, seed + i, eased));
357
+ a += g * std:: fabs (noise3d_gradient (x * f, y * f, z * f, seed + i, eased));
358
358
f *= 2.0 ;
359
359
g *= persistence;
360
360
}
@@ -364,7 +364,7 @@ float noise3d_perlin_abs(float x, float y, float z, s32 seed,
364
364
365
365
float contour (float v)
366
366
{
367
- v = fabs (v);
367
+ v = std:: fabs (v);
368
368
if (v >= 1.0 )
369
369
return 0.0 ;
370
370
return (1.0 - v);
@@ -389,7 +389,7 @@ float NoisePerlin2D(NoiseParams *np, float x, float y, s32 seed)
389
389
np->flags & (NOISE_FLAG_DEFAULTS | NOISE_FLAG_EASED));
390
390
391
391
if (np->flags & NOISE_FLAG_ABSVALUE)
392
- noiseval = fabs (noiseval);
392
+ noiseval = std:: fabs (noiseval);
393
393
394
394
a += g * noiseval;
395
395
f *= np->lacunarity ;
@@ -416,7 +416,7 @@ float NoisePerlin3D(NoiseParams *np, float x, float y, float z, s32 seed)
416
416
np->flags & NOISE_FLAG_EASED);
417
417
418
418
if (np->flags & NOISE_FLAG_ABSVALUE)
419
- noiseval = fabs (noiseval);
419
+ noiseval = std:: fabs (noiseval);
420
420
421
421
a += g * noiseval;
422
422
f *= np->lacunarity ;
@@ -522,9 +522,9 @@ void Noise::resizeNoiseBuf(bool is3d)
522
522
523
523
// + 2 for the two initial endpoints
524
524
// + 1 for potentially crossing a boundary due to offset
525
- size_t nlx = (size_t )ceil (num_noise_points_x) + 3 ;
526
- size_t nly = (size_t )ceil (num_noise_points_y) + 3 ;
527
- size_t nlz = is3d ? (size_t )ceil (num_noise_points_z) + 3 : 1 ;
525
+ size_t nlx = (size_t )std:: ceil (num_noise_points_x) + 3 ;
526
+ size_t nly = (size_t )std:: ceil (num_noise_points_y) + 3 ;
527
+ size_t nlz = is3d ? (size_t )std:: ceil (num_noise_points_z) + 3 : 1 ;
528
528
529
529
delete[] noise_buf;
530
530
try {
@@ -561,8 +561,8 @@ void Noise::gradientMap2D(
561
561
Interp2dFxn interpolate = eased ?
562
562
biLinearInterpolation : biLinearInterpolationNoEase;
563
563
564
- x0 = floor (x);
565
- y0 = floor (y);
564
+ x0 = std:: floor (x);
565
+ y0 = std:: floor (y);
566
566
u = x - (float )x0;
567
567
v = y - (float )y0 ;
568
568
orig_u = u;
@@ -626,9 +626,9 @@ void Noise::gradientMap3D(
626
626
Interp3dFxn interpolate = (np.flags & NOISE_FLAG_EASED) ?
627
627
triLinearInterpolation : triLinearInterpolationNoEase;
628
628
629
- x0 = floor (x);
630
- y0 = floor (y);
631
- z0 = floor (z);
629
+ x0 = std:: floor (x);
630
+ y0 = std:: floor (y);
631
+ z0 = std:: floor (z);
632
632
u = x - (float )x0;
633
633
v = y - (float )y0 ;
634
634
w = z - (float )z0;
@@ -730,7 +730,7 @@ float *Noise::perlinMap2D(float x, float y, float *persistence_map)
730
730
g *= np.persist ;
731
731
}
732
732
733
- if (fabs (np.offset - 0 .f ) > 0.00001 || fabs (np.scale - 1 .f ) > 0.00001 ) {
733
+ if (std:: fabs (np.offset - 0 .f ) > 0.00001 || std:: fabs (np.scale - 1 .f ) > 0.00001 ) {
734
734
for (size_t i = 0 ; i != bufsize; i++)
735
735
result[i] = result[i] * np.scale + np.offset ;
736
736
}
@@ -768,7 +768,7 @@ float *Noise::perlinMap3D(float x, float y, float z, float *persistence_map)
768
768
g *= np.persist ;
769
769
}
770
770
771
- if (fabs (np.offset - 0 .f ) > 0.00001 || fabs (np.scale - 1 .f ) > 0.00001 ) {
771
+ if (std:: fabs (np.offset - 0 .f ) > 0.00001 || std:: fabs (np.scale - 1 .f ) > 0.00001 ) {
772
772
for (size_t i = 0 ; i != bufsize; i++)
773
773
result[i] = result[i] * np.scale + np.offset ;
774
774
}
@@ -785,12 +785,12 @@ void Noise::updateResults(float g, float *gmap,
785
785
if (np.flags & NOISE_FLAG_ABSVALUE) {
786
786
if (persistence_map) {
787
787
for (size_t i = 0 ; i != bufsize; i++) {
788
- result[i] += gmap[i] * fabs (gradient_buf[i]);
788
+ result[i] += gmap[i] * std:: fabs (gradient_buf[i]);
789
789
gmap[i] *= persistence_map[i];
790
790
}
791
791
} else {
792
792
for (size_t i = 0 ; i != bufsize; i++)
793
- result[i] += g * fabs (gradient_buf[i]);
793
+ result[i] += g * std:: fabs (gradient_buf[i]);
794
794
}
795
795
} else {
796
796
if (persistence_map) {
0 commit comments