This function computes the missing length (must have at least 2 sides) and
the interior angles (degrees) of a right triangle.
Usage
righttri(a = NULL, b = NULL, c = NULL)
Value
list of known sides a, b, and c & the interior angles
A, B, and C (right angle), in degrees, if and only if the given
sides create a right triangle.
Arguments
a
numeric vector that contains the known side a, if known
b
numeric vector that contains the known side b, if known
c
numeric vector that contains the known side c (hypotenuse),
if known
Details
Side a is the side adjacent to angle B and opposite angle A. Side b
is the side adjacent to angle A and opposite angle B. Side c (hypotenuse)
is opposite the right angle (angle C).
This function makes the following calculations:
the length of the missing side using the Pythagorean theorem,
the area of the right triangle,
the altitude of the right triangle,
the angle associated with the side named a (degrees),
the angle associated with the side named b (degrees), and
the angle associated with the side named c (degrees).
library("iemisc")
if (FALSE) {
righttri(0, 2) # a = 0, b = 2righttri(1, 2) # a = 1, b = 2righttri(a = 5, c = 10)
righttri(a = 3, c = 5)
righttri(a = 5, c = 10)
}