R/LawofCosines.R

Defines functions LawofCosines

Documented in LawofCosines

LawofCosines <-
function(sides){
    a <- sides[1]; b <- sides[2]; c <- sides[3]
    acos(-(c^2 - a^2 - b^2)/(2*a*b))*180/pi
}

Try the MiscMath package in your browser

Any scripts or data that you put into this service are public.

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