Similar to clamp, where the first argument is folded back across the third and second limits until it lies between them.
type | :: "function-application" | |
function_name | :: "ridge" | |
arguments | :: {NoiseNumber, NoiseNumber, NoiseNumber} | The first argument is the number to be ridged, the second is the lower limit and the third is the upper limit. |
The first argument is the number to be ridged, the second is the lower limit and the third is the upper limit. |
arguments | :: {NoiseNumber, NoiseNumber, NoiseNumber} | The first argument is the number to be ridged, the second is the lower limit and the third is the upper limit. |
The first argument is the number to be ridged, the second is the lower limit and the third is the upper limit. | ||
function_name | :: "ridge" | |
type | :: "function-application" |
The first argument is the number to be ridged, the second is the lower limit and the third is the upper limit.
local noise = require("noise")
local ridge_1 = noise.ridge(6, 1, 5) -- this returns 4
local ridge_2 = noise.ridge(-1, 1, 5) -- this returns 3