This commit is contained in:
Richard Milewski 2026-01-28 15:04:05 -08:00
parent 1a7029faeb
commit a8eb06bff3

View file

@ -372,13 +372,11 @@ function opp_adj_to_hyp(opp,adj) = adj_opp_to_hyp(adj,opp);
// Function: adj_ang_to_hyp()
// Alias: ang_adj_to_hyp()
// Synopsis: Returns the hypotenuse length from the length of the adjacent and the angle.
// Synopsis: Returns the hypotenuse length from the length of the adjacent side and the primary angle.
// Topics: Geometry, Trigonometry, Triangles
// See Also: adj_ang_to_hyp(), adj_ang_to_opp(), adj_opp_to_ang(), adj_opp_to_hyp(), hyp_adj_to_ang(), hyp_adj_to_opp(), hyp_ang_to_adj(), hyp_ang_to_opp(), hyp_opp_to_adj(), hyp_opp_to_ang(), opp_ang_to_adj(), opp_ang_to_hyp()
// Usage:
// hyp = adj_ang_to_hyp(adj,ang);
// hyp = ang_adj_to_hyp(ang,adj);
// Description:
// For a right triangle, given the length of the adjacent side, and the corner angle, returns the length of the hypotenuse.
// Arguments:
@ -391,6 +389,20 @@ function adj_ang_to_hyp(adj,ang) =
assert(is_finite(ang) && ang>-90 && ang<90, "The angle should be an acute angle." )
adj/cos(ang);
// Function: ang_adj_to_hyp()
// Synopsis: Returns the hypotenuse length from the primary angle and length of the adjacent side.
// Topics: Geometry, Trigonometry, Triangles
// See Also: adj_ang_to_hyp(), adj_ang_to_opp(), adj_opp_to_ang(), adj_opp_to_hyp(), hyp_adj_to_ang(), hyp_adj_to_opp(), hyp_ang_to_adj(), hyp_ang_to_opp(), hyp_opp_to_adj(), hyp_opp_to_ang(), opp_ang_to_adj(), opp_ang_to_hyp()
// Usage:
// hyp = ang_adj_to_hyp(ang,adj);
// Description:
// For a right triangle, given the primary angle and length of the adjacent side, returns the length of the hypotenuse.
// Arguments:
// ang = The angle in degrees of the primary corner of the right triangle.
// adj = The length of the side of the right triangle that is adjacent to the primary angle.
// Example:
// hyp = ang_adj_to_hyp(60,4); // Returns: 8
function ang_adj_to_hyp(ang,adj) = adj_ang_to_hyp(adj,ang);