What is the value of the angle x?
randRange( 0, 2 ) "" [ "CAB", "ABC", "BCA" ] "" "" randomTriangleAngles.triangle() "" [ RAND_ANG ] clearArray( [ "x", "x", "x" ], [ RAND_ANG ] ) [ 0, 2 ] [ 0, 2 ] function(){ var trA = new Triangle( [ 3, -5 ], ANGLES ,6, {} ); trA.labels = { "points" : [ "A", "B", "C" ], "sides" : clearArray( trA.niceSideLengths, SIDES_A ), "angles" : clearArray( trA.niceAngles, ANGLES_A ) }; return trA; }() function(){ var trB = new Triangle( [ TR_A.centroid[ 0 ], TR_A.centroid[ 1 ] ], ANGLES, 6, {} ); trB.rotate( 180 ); trB.labels = { "points" : [ "D", "", "" ], "sides" : clearArray( trB.niceSideLengths, SIDES_B ),"angles" : ANGLES_B }; return trB; }() ANGLES[ RAND_ANG ]
init({ range: [ [-1, 15 ], [ -7, 2.5 ] ], scale: 31 }) TR_A.draw(); TR_A.drawLabels(); TR_B.draw(); TR_B.drawLabels();
ANSWER
randRangeUnique( 0, 3, 2 ) randFromArray( ANG_FIRST ) ANG_FIRST clearArray( [ "x", "x", "x" ], [ ANG_LEFT ] ) TR_B.angles[ ANG_LEFT ]

These two triangles have three sides equal (they share one of them).

Therefore they are congruent.

Congruent triangles also have congruent (equal) angles.

If we superimpose these two triangles, by rotating triangle ABC, we see that angle x corresponds to angle ANGLE_LABELS[ ANG_LEFT ]

Angle x is therefore equal to ANSWER.

randRangeUnique( 0, 3, 2 ) randRangeExclude( 0, 2, ANG_FIRST ) ANG_FIRST clearArray( [ "x", "x", "x" ], [ ANG_LEFT ] )
TR_B.angles[ ANG_LEFT ]

These two triangles have three sides equal (they share one of them).

Therefore they are congruent.

Congruent triangles also have congruent (equal) angles.

If we superimpose these two triangles, by rotating triangle ABC, we see that angle x corresponds to angle ANGLE_LABELS[ ANG_LEFT ].

ANGLE_LABELS[ ANG_LEFT ] = 180 - TR_A.angles[ ANG_FIRST[ 0 ] ] - TR_A.angles[ ANG_FIRST[ 1 ] ]

ANGLE_LABELS[ ANG_LEFT ] = x = TR_B.angles[ ANG_LEFT ]

TR_A.labels.angles = TR_A.niceAngles; TR_A.drawLabels();
function(){ var newAng = RAND_ANG; if ( RAND_ANG === 0 ){ newAng = 1; } else if ( RAND_ANG === 1 ){ newAng = 0; } return newAng; }() [ 0, 1 ] randRangeUnique( 0, 3, 2 ) randRange( 0, 2 ) function(){ if ( ANG_LEFT === 1 ){ return 0; } if ( ANG_LEFT === 0 ){ return 1; } return 2; }() ( $.inArray( SHOW_ANGLE, ANG_FIRST ) !== -1 ) ANG_FIRST clearArray( [ "x", "x", "x" ], [ ANG_LEFT ] ) ANGLES[ 0 ] / 2 function(){ var trA = new Triangle( [ 7, -3 ], ANGLES ,6, {} ); trA.rotationCenter = trA.points[ 0 ]; trA.rotate( ANG ); trA.labels = { "points" : [ "", "B", "C" ], "sides" : clearArray( trA.niceSideLengths, SIDES_A ), "angles" : clearArray( trA.niceAngles, ANGLES_A ) }; return trA; }() function(){ var trB = new Triangle( [ 7 - cos( ANG * PI / 180 ) * TR_A.sideLengths[ 0 ], -3 - sin( ANG * PI / 180 ) * TR_A.sideLengths[ 0 ] ], [ ANGLES[ 1 ], ANGLES[ 0 ], ANGLES[ 2 ] ] , 6, {} ); trB.rotationCenter = trB.points[ 0 ]; trB.rotate( -ANG ); trB.labels = { "points" : [ "D", "", "E" ], "sides" : clearArray( trB.niceSideLengths, SIDES_B ), "angles" : ANGLES_B }; return trB; }() TR_B.angles[ ANG_LEFT ]
init({ range: [ [-1, 15 ], [ -7, 2.5 ] ], scale: 32 }) TR_A.draw(); TR_A.drawLabels(); TR_B.draw(); TR_B.drawLabels(); label( TR_B.points[ 1 ], "A", "above" );
ANSWER

These two triangles have two sides and an angle equal.

Therefore they are congruent.

Congruent triangles also have congruent (equal) angles.

If we superimpose these two triangles, by flipping triangle EDA, we see that angle x corresponds to angle ANGLE_LABELS[ SHOW_ANGLE ]

ANGLE_LABELS[ SHOW_ANGLE ] = 180 - TR_A.angles[ ANG_FIRST[ 0 ] ] - TR_A.angles[ ANG_FIRST[ 1 ] ]

ANGLE_LABELS[ SHOW_ANGLE ] = x = TR_B.angles[ ANG_LEFT ]

TR_A.labels.angles = TR_A.niceAngles; TR_A.drawLabels();

Angle x is therefore equal to ANSWER