@@ -116,11 +116,13 @@ const rightTriangle = new Shape();
116116rightTriangle . moveTo ( 1 , 1 ) ;
117117rightTriangle . lineTo ( 1 , - 1 ) ;
118118rightTriangle . lineTo ( - 1 , 1 ) ;
119+ rightTriangle . lineTo ( 1 , 1 ) ;
119120
120121const rightTriangle2 = new Shape ( ) ;
121122rightTriangle2 . moveTo ( 1 , 1 ) ;
122123rightTriangle2 . lineTo ( - 1 , 1 ) ;
123124rightTriangle2 . lineTo ( 1 , - 1 ) ;
125+ rightTriangle2 . lineTo ( 1 , 1 ) ;
124126
125127test ( 'Extents no Rotation' , ( ) => {
126128 expect ( BuildingShapeUtils . extents ( rightTriangle ) ) . toStrictEqual ( [ - 1 , - 1 , 1 , 1 ] ) ;
@@ -149,7 +151,7 @@ test('Vertex Angles counterclockwise', () => {
149151/** Test edgeDirection */
150152describe . each ( [
151153 [ rightTriangle , [ - Math . PI / 2 , 3 * Math . PI / 4 , 0 ] , 'CW' ] ,
152- [ rightTriangle2 , [ - Math . PI , - Math . PI / 4 , Math . PI / 2 ] , 'CCW' ] ,
154+ [ rightTriangle2 , [ Math . PI , - Math . PI / 4 , Math . PI / 2 ] , 'CCW' ] ,
153155] ) ( 'Edge Direction' , ( shape , expected , description ) => {
154156 test ( `${ description } ` , ( ) => {
155157 expect ( BuildingShapeUtils . edgeDirection ( shape ) ) . toBeDeepCloseTo ( expected ) ;
@@ -158,7 +160,8 @@ describe.each([
158160
159161/** Test surrounds */
160162describe . each ( [
161- [ [ - 1 , - 1 ] , false , 'Outside' ] ,
163+ [ [ - .5 , - .5 ] , false , 'Outside but crossing' ] ,
164+ [ [ - 1.5 , - 1.5 ] , false , 'Outside no crossings' ] ,
162165 [ [ 1 , 1 ] , true , 'Share Node' ] ,
163166 [ [ .5 , .5 ] , true , 'Inside' ] ,
164167 [ [ 0 , 0 ] , true , 'Border' ] ,
@@ -180,8 +183,8 @@ test('Longest side angle', () => {
180183
181184/** Test repositionPoint */
182185test ( 'Reposition Point' , ( ) => {
183- const point = [ 11.0155721 , 49.583313 ] ;
186+ const point = [ 11.0154519 , 49.5834188 ] ;
184187 const home = [ 11.015512 , 49.5833659 ] ;
185- const expected = [ 4.332747472234555 , - 5.882209888874915 ] ;
188+ const expected = [ - 4.3327380768877335 , 5.88221335051411 ] ;
186189 expect ( BuildingShapeUtils . repositionPoint ( point , home ) ) . toStrictEqual ( expected ) ;
187190} ) ;
0 commit comments