Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

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

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.

Parameters

x: number

Start point.

y: number

End point.

t: number

interpolation factor in the closed interval [0, 1]

Returns

number