LawofCosines: Law of Cosines

View source: R/LawofCosines.R

LawofCosinesR Documentation

Law of Cosines

Description

Use of the ancient law of cosines to determine the angle between two sides of a triangle, given lengths of all three sides. This is a generalization of Pythagoras' Theorem.

Usage

LawofCosines(sides)

Arguments

sides

a numeric vector of length 3, containing the side lengths.

Value

a numeric constant giving the angle in between the sides corresponding to the first two components in sides. Result is expressed in degrees.

Examples

LawofCosines(c(3, 4, 5))

MiscMath documentation built on April 13, 2025, 9:07 a.m.