Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/threejs_4_deno/src/Three.js>MathUtils.mapLinear

A simple transformation of three.js for use within a Deno workflow
Go to Latest
function MathUtils.mapLinear
import { MathUtils } from "https://deno.land/x/threejs_4_deno@v121/src/Three.js";
const { mapLinear } = MathUtils;

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

Parameters

x: number

Value to be mapped.

a1: number

Minimum value for range A.

a2: number

Maximum value for range A.

b1: number

Minimum value for range B.

b2: number

Maximum value for range B.

Returns

number