cosine.ang: Computes angle between two segments sharing a point.

View source: R/trig.funs.R

cosine.angR Documentation

Computes angle between two segments sharing a point.

Description

Computes angle between two segments of a triangle using law of cosines.

Usage

cosine.ang(l, r, o)

Arguments

l

Numeric; length of segment to the left

r

Numeric; length of segment to the right

o

Numeric; length of opposite segment

Value

A single value of the angle in radians

Examples

#a right triangle
L=3
R=3
O=sqrt(L^2+R^2)
cosine.ang(L,R,O)

ckenaley/trackter documentation built on Jan. 9, 2025, 10:45 p.m.