angle2slope {dendrometry} | R Documentation |
Angle - Slope conversion and Principal Measure determination
Description
Conversion of angle to slope values and reciprocally.
angle2slope
converts angle to slope values.
slope2angle
converts slope to angle values.
principal
determines the principal measure of an angle value.
Principal measure ranges from -pi to pi for radian unit while it ranges from
-180 to 180 for degree unit.
Usage
angle2slope(angle, angleUnit = c("deg", "rad"))
slope2angle(slope, angleUnit = c("deg", "rad"))
principal(angle, angleUnit = c("deg", "rad"))
Arguments
angle |
numeric, vector of angle to be converted to slope. |
angleUnit |
character, unit of |
slope |
numeric, vector of slope to be converted to angle. |
Value
Object of class angle
.
angle2slope
returns vector of slope values while
slope2angle
and principal
return vector of angle values in unit
specified in angle
argument.
Note
Use principal
in position computations, not distance computations.
See Also
Examples
angle2slope(10)
angle2slope(angle = 45)
angle2slope(angle = pi / 4, angleUnit = "rad")
angle2slope(1.047198, "rad")
angle2slope(seq(0.2, 1.5, .4), angleUnit = "rad") #'
slope2angle(100)
slope2angle(100, "rad")
round(pi / 4, 2)
slope2angle(17.6327)
slope2angle(angle2slope(30))
principal(303)
principal(23 * pi / 8, "rad")
principal(7 * pi / 4, angleUnit = "rad")
deg(principal(7 * pi / 4, angleUnit = "rad"))
principal(7 * 45)