Simplifies performing Trig calculations by providing descriptive function names. No more having to remember whether Sin, Cos, or Tan need to be used to get the value you are needing.
- Add a using statement for
SohCahToa
- Call static functions within the
Trig
class
var run = 10;
var rise = 15;
var hypotenuse = Trig.Hypotenuse_RiseRun(rise, run);
- Hypotenuse = c
- Run = b
- Rise = a
- Primary Angle = AA
- Complimentary Angle = BB
Angles are in degrees
[Value to be Calculated]_[Input 1][Input 2]
For Example:
The function to use for calculating the hypotenuse of a triangle using the Rise and Run values would be Hypotenuse_RiseRun()
Alternatively, there are functions that reference the values shown in the image above that could be used instead of using the descriptive names.
-
Sides are named with lower case letters (a,b,c)
-
Angles are named with upper case double letters (AA, BB)
The same calculated from above, calculating the hypotenuse using the Rise and Run values would be c_ab()