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#clampScalar

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

If this vector's x or y values are greater than the max value, they are replaced by the max value. If this vector's x or y values are less than the min value, they are replaced by the min value.

Parameters

min: number

the minimum value the components will be clamped to.

max: number

the maximum value the components will be clamped to.