@@ -285,15 +285,15 @@ end
285
285
@test collect (GeometryBasics. consecutive_pairs (ps)) == collect (zip (ps[1 : end - 1 ], ps[2 : end ]))
286
286
287
287
ps = Point2f[(0 ,0 ), (1 ,0 ), (0 ,1 ), (1 ,2 ), (0 ,2 ), (1 ,1 ), (0 ,0 )]
288
- idxs, ips = _self_intersections (ps)
288
+ idxs, ips = GeometryBasics . _self_intersections (ps)
289
289
@test idxs == [(2 , 6 ), (3 , 5 )]
290
290
@test ips == [Point2f (0.5 ), Point2f (0.5 , 1.5 )]
291
291
idxs2, ips2 = self_intersections (ps)
292
292
@test ips2 == ips
293
293
@test idxs2 == [2 , 6 , 3 , 5 ]
294
294
295
295
ps = [Point2f (cos (x), sin (x)) for x in 0 : 4pi / 5 : 4pi + 0.1 ]
296
- idxs, ips = _self_intersections (ps)
296
+ idxs, ips = GeometryBasics . _self_intersections (ps)
297
297
@test idxs == [(1 , 3 ), (1 , 4 ), (2 , 4 ), (2 , 5 ), (3 , 5 )]
298
298
@test all (ips .≈ Point2f[(0.30901694 , 0.2245140 ), (- 0.118034005 , 0.36327127 ), (- 0.38196602 , 0 ), (- 0.118033946 , - 0.3632713 ), (0.309017 , - 0.22451389 )])
299
299
idxs2, ips2 = self_intersections (ps)
302
302
303
303
@test_throws ErrorException split_intersections (ps)
304
304
ps = Point2f[(0 ,0 ), (1 ,0 ), (0 ,1 ), (1 ,1 ), (0 , 0 )]
305
- idxs, ips = _self_intersections (ps)
305
+ idxs, ips = GeometryBasics . _self_intersections (ps)
306
306
sps = split_intersections (ps)
307
307
@test sps[1 ] == [ps[3 ], ps[4 ], ips[1 ]]
308
308
@test sps[2 ] == [ps[5 ], ps[1 ], ps[2 ], ips[1 ]]
0 commit comments