shuffle(randFromArray([[3,4], [6,8], [5,12], [7, 24], [8, 15], [10, 24], [12,16]]))
BC
sqrt(AC * AC + BC * BC)
5 / AB
randFromArray([
"ABC",
"BAC"
])
(ANGLE.substring(0,1) + ANGLE.substring(2))
(function(){
if ( OPPOSITE_NAME === "AC" ){
return AC;
}
else if ( OPPOSITE_NAME === "BC" ){
return CB;
}
return AB;
})()
"AB"
AB
ANGLE.substring(1)
(function(){
if ( ADJACENT_NAME === "AC" ){
return AC;
}
else if ( ADJACENT_NAME === "BC" ){
return BC;
}
return AB;
})()
fraction( OPPOSITE_VALUE, ADJACENT_VALUE, false, false, false, false)
OPPOSITE_VALUE / ADJACENT_VALUE
fraction(OPPOSITE_VALUE, AB)
OPPOSITE_VALUE / AB
fraction(ADJACENT_VALUE, AB)
ADJACENT_VALUE / AB
\overline{AC}
is AC
units long
\overline{BC}
is BC
units long
\overline{AB}
is AB
units long
What is \sin(\angle ANGLE)
?
betterTriangle(BC * SCALE, AC * SCALE, "A", "B", "C", BC, AC, AB);
SIN
SOH CAH TOA
Sin = Opposite over Hypotenuse
\sin(\angle ANGLE)=SIMPLE_SIN
What is \cos(\angle ANGLE)
?
betterTriangle(BC * SCALE, AC * SCALE, "A", "B", "C", BC, AC, AB);
COS
SOH CAH TOA
Cos = Adjacent over Hypotenuse
\cos(\angle ANGLE )=SIMPLE_COS
What is \tan(\angle ANGLE)
?
betterTriangle(BC * SCALE, AC * SCALE, "A", "B", "C", BC, AC, AB);
TAN
SOH CAH TOA
Tan = Opposite over Adjacent
\tan(\angle ANGLE)=SIMPLE_TAN
First identify \angle ANGLE
if (ANGLE === 'ABC') {
var angle = atan(AC / BC) * 180 / Math.PI;
arc([BC * SCALE, 0], 0.6, 180 - angle, 180);
} else {
var angle = atan(BC / AC) * 180 / Math.PI;
arc([0, AC * SCALE], 0.6, 270, 270 + angle);
}
Therefore:
opposite = \overline{OPPOSITE_NAME} = OPPOSITE_VALUE
adjacent = \overline{ADJACENT_NAME} = ADJACENT_VALUE