@@ -124,6 +124,13 @@ rightTriangle2.lineTo(-1, 1);
124124rightTriangle2 . lineTo ( 1 , - 1 ) ;
125125rightTriangle2 . lineTo ( 1 , 1 ) ;
126126
127+ const rectangle = new Shape ( ) ;
128+ rectangle . moveTo ( - 4.332738077015795 , - 5.882209888874915 ) ;
129+ rectangle . lineTo ( - 4.332738077015795 , 5.88221335051411 ) ;
130+ rectangle . lineTo ( 4.332747472106493 , 5.88221335051411 ) ;
131+ rectangle . lineTo ( 4.332747472106493 , - 5.882209888874915 ) ;
132+ rectangle . lineTo ( - 4.332738077015795 , - 5.882209888874915 ) ;
133+
127134test ( 'Extents no Rotation' , ( ) => {
128135 expect ( BuildingShapeUtils . extents ( rightTriangle ) ) . toStrictEqual ( [ - 1 , - 1 , 1 , 1 ] ) ;
129136} ) ;
@@ -152,9 +159,10 @@ test('Vertex Angles counterclockwise', () => {
152159describe . each ( [
153160 [ rightTriangle , [ - Math . PI / 2 , 3 * Math . PI / 4 , 0 ] , 'CW' ] ,
154161 [ rightTriangle2 , [ Math . PI , - Math . PI / 4 , Math . PI / 2 ] , 'CCW' ] ,
162+ [ rectangle , [ Math . PI / 2 , 0 , - Math . PI / 2 , Math . PI ] , 'Rect' ] ,
155163] ) ( 'Edge Direction' , ( shape , expected , description ) => {
156164 test ( `${ description } ` , ( ) => {
157- expect ( BuildingShapeUtils . edgeDirection ( shape ) ) . toBeDeepCloseTo ( expected ) ;
165+ expect ( BuildingShapeUtils . edgeDirection ( shape ) ) . toStrictEqual ( expected ) ;
158166 } ) ;
159167} ) ;
160168
0 commit comments