CreateLineAngle: Creates a vector to represent a line that passes through a...

Description Usage Arguments Value Examples

View source: R/CreateLineAngle.R

Description

CreateLineAngle creates a vector to represent a line that passes through a point and forms certain angle with X axis

Usage

1
CreateLineAngle(P, angle)

Arguments

P

Vector containing the xy-coordinates of a point

angle

Angle in degrees (0-360) for the line

Value

Returns a vector which contains the slope and intercept of the defined line. If the angle is defined as 90, the slope is set to Inf and the intercept is replaced by the x-value for the line (which is a vertical line in this situation)

Examples

1
2
3
P <- c(0,0)
angle <- 45
Line <- CreateLineAngle(P, angle)

Example output



LearnGeom documentation built on July 14, 2020, 5:06 p.m.