Skip to contents

Vector2 Clamp

Usage

vector2_clamp(v, min, max)

Arguments

v

A numeric vector of length 2.

min

A numeric vector of length 2.

max

A numeric vector of length 2.

Value

A numeric vector of length 2

Examples

vector2_clamp(c(100, 100), c(100, 100), c(100, 100))
#>   x   y 
#> 100 100