# triangle
# triangle
- triangle
- static
- .toRadians ⇒
Number
- .toDegrees ⇒
Number
- .solve ⇒
Object
- .solve90SA ⇒
Object
- .toRadians ⇒
- inner
[~solveab Solve a partial right triangle object from two sides (a and b). Angles are in degrees. Angle
C
is set to 90 degrees. Requires a Side and an Angle./| /B| / | c/ |a /A C| /_____| b()](#module_triangle..solveab Solve a partial right triangle object from two sides (a and b). Angles are in degrees. Angle
C
is set to 90 degrees. Requires a Side and an Angle./| /B| / | c/ |a /A C| /_____| b) ⇒
Object
- static
# triangle.toRadians ⇒ Number
Convert degrees to radians.
Kind: static constant of triangle
Returns: Number
- value in radians
Param | Type | Description |
---|---|---|
deg | Number | value in degrees |
# triangle.toDegrees ⇒ Number
Convert radians to degrees.
Kind: static constant of triangle
Returns: Number
- value in degrees
Param | Type | Description |
---|---|---|
rad | Number | value in radians |
# triangle.solve ⇒ Object
Solve a 90 degree triangle from two points.
Kind: static constant of triangle
Returns: Object
- A triangle object {A,B,C,a,b,c}
Param | Type | Description |
---|---|---|
p1.x | Number | Point 1 x coordinate |
p1.y | Number | Point 1 y coordinate |
p2.x | Number | Point 2 x coordinate |
p2.y | Number | Point 2 y coordinate |
# triangle.solve90SA ⇒ Object
Solve a partial triangle object. Angles are in degrees.
Angle C
is set to 90 degrees. Requires a Side and an
Angle.
/\
/ B\
c / \ a
/
/A C
/----------
b
/|
/B|
/ |
c/ |a
/A C|
/_____|
b
Kind: static constant of triangle
Returns: Object
- A solved triangle object {A,B,C,a,b,c}
Param | Type | Description |
---|---|---|
r.a | Number | Length of side a |
r.A | Number | Angle A in degrees |
r.b | Number | Length of side b |
r.B | Number | Angle B in degrees |
r.c | Number | Length of side c |
<a name="module_triangle..solveab
Solve a partial right triangle object from two sides (a and b). Angles are in degrees.
Angle C
is set to 90 degrees. Requires a Side and an
Angle.
/|
/B|
/ |
c/ |a
/A C|
/_____|
b"></a>
# triangle~solveab
Solve a partial right triangle object from two sides (a and b). Angles are in degrees.
Angle C
is set to 90 degrees. Requires a Side and an
Angle.
/\|
/B\|
/ \|
c/ \|a
/A C\|
/\_\_\_\_\_\|
b() ⇒ <code>Object</code>
Kind: inner method of triangle
Returns: Object
- A solved triangle object {A,B,C,a,b,c}
Param | Type | Description |
---|---|---|
r.a | Number | Length of side a |
r.b | Number | Length of side b |