UNPKG

@osbjs/osbjs

Version:

a minimalist osu! storyboarding framework

36 lines (35 loc) 1.71 kB
/** * 2-dimensional noise function. * Returns a number in range from -1 to 1. * The result is not actually random; * it is based on Simplex noise, * which means that the return values for two input values that are near one another tend to be near one another. * This type of noise is useful when you want a sequence of seemingly random numbers that don’t vary wildly from one to the other. */ export declare function noise2D(x: number, y: number): number; /** * 3-dimensional noise function. * Returns a number in range from -1 to 1. * The result is not actually random; * it is based on Simplex noise, * which means that the return values for two input values that are near one another tend to be near one another. * This type of noise is useful when you want a sequence of seemingly random numbers that don’t vary wildly from one to the other. */ export declare function noise3D(x: number, y: number, z: number): number; /** * 4-dimensional noise function. * Returns a number in range from -1 to 1. * The result is not actually random; * it is based on Simplex noise, * which means that the return values for two input values that are near one another tend to be near one another. * This type of noise is useful when you want a sequence of seemingly random numbers that don’t vary wildly from one to the other. */ export declare function noise4D(x: number, y: number, z: number, w: number): number; /** * Random integer in the interval [low, high]. */ export declare function randInt(low: number, high: number): number; /** * Random float in the interval [low, high]. */ export declare function randFloat(low: number, high: number): number;