openrndr / orx

A growing library of assorted data structures, algorithms and utilities for OPENRNDR
https://openrndr.org
BSD 2-Clause "Simplified" License
121 stars 37 forks source link

[orx-noise] Double.gaussian causes StackOverflowError because of unintended recursion #167

Closed Yvee1 closed 3 years ago

Yvee1 commented 3 years ago

Describe the bug Calling Double.gaussian(...) causes a StackOverflowError.

To Reproduce Call Double.gaussian(...)

Expected behavior Identical behavior to calling gaussian()

Additional context The issue is that Double.gaussian calls gaussian internally. The intention was to call the general gaussian function but actually gaussian refers to Double.gaussian itself in that context, causing unintended recursion and hence never-ending function calls.

edwinRNDR commented 3 years ago

Addressed in https://github.com/openrndr/orx/commit/8cc54dc35d4c3146647004e42ebc5612b1ba4e37