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

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

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

Clamps the x to be between a and b.

Parameters

value: number

Value to be clamped.

min: number

Minimum value

max: number

Maximum value.

Returns

number