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

A framework for Beat Saber map scripting.
Go to Latest
method three.Vector2.prototype.clamp
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 value is greater than the max vector's x or y value, it is replaced by the corresponding value. If this vector's x or y value is less than the min vector's x or y value, it is replaced by the corresponding value.

Parameters

min: Vector2

the minimum x and y values.

max: Vector2

the maximum x and y values in the desired range.