Skip to contents

Vector2 Move Towards

Usage

vector2_move_towards(v, target, max_distance)

Arguments

v

A numeric vector of length 2.

target

A numeric vector of length 2.

max_distance

A number.

Value

A numeric vector of length 2

Examples

vector2_move_towards(c(100, 100), c(100, 100), 0.0)
#>   x   y 
#> 100 100