vector_length: Give the Length of a Vector

View source: R/vector_length.R

vector_lengthR Documentation

Give the Length of a Vector

Description

A vector given by two points in a plane.

Usage

vector_length(p1, p2 = c(0, 0))

Arguments

p1

The first point (x, y).

p2

The second point (x, y).

Value

The length of the vector.

See Also

Other geometry functions: get_intersection(), points2equation()

Examples

p1 <- c(0, 4)
vector_length(p1)
p2 <- c(3, 4)
vector_length(p1, p2)

treePlotArea documentation built on June 22, 2024, 6:57 p.m.