Skip to content

Commit b2bde7e

Browse files
author
Martin Klang
committed
removed weird asserts from noise() and use our randf() function instead of rand()
1 parent 43e3ed8 commit b2bde7e

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

LibSource/FloatArray.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,8 @@ void FloatArray::noise(){
410410
void FloatArray::noise(float min, float max){
411411
float amplitude = fabsf(max-min);
412412
float offset = min;
413-
ASSERT(getSize()>10, "10<getSize");
414-
ASSERT(size==getSize(), "getSize");
415-
for(size_t n=0; n<size; n++){
416-
data[n]=(rand()/(float)RAND_MAX) * amplitude + offset;
417-
}
413+
for(size_t n=0; n<size; n++)
414+
data[n] = randf() * amplitude + offset;
418415
}
419416

420417

0 commit comments

Comments
 (0)