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

x/remapper/src/deps.ts>three.Vector2#clampLength

A framework for Beat Saber map scripting.
Go to Latest
method three.Vector2.prototype.clampLength
Re-export
import { three } from "https://deno.land/x/remapper@2.1.0/src/deps.ts";
const { Vector2 } = three;

If this vector's length is greater than the max value, it is replaced by the max value. If this vector's length is less than the min value, it is replaced by the min value.

Parameters

min: number

the minimum value the length will be clamped to.

max: number

the maximum value the length will be clamped to.