Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/threejs_4_deno/src/math/MathUtils.d.ts

A simple transformation of three.js for use within a Deno workflow
Go to Latest
import * as threejs4Deno from "https://deno.land/x/threejs_4_deno@v121/src/math/MathUtils.d.ts";

Functions

Clamps the x to be between a and b.

Returns a value linearly interpolated from two known points based on the given interval - t = 0 will return x and t = 1 will return y.

Linear mapping of x from range [a1, a2] to range [b1, b2].

Random float from low to high interval.

Random float from - range / 2 to range / 2 interval.

Random integer from low to high interval.

Random float from 0 to 1 with 16 bits of randomness. Standard Math.random() creates repetitive patterns when applied over larger space.

Deterministic pseudo-random float in the interval [ 0, 1 ].