@@ -529,7 +529,7 @@ func TestEdgeDistanceUpdateMinInteriorDistanceMaxError(t *testing.T) {
529
529
}
530
530
a1 := PointOnLine (a0 , randomPoint (), length )
531
531
532
- // TODO(ericv ): The error bound holds for antipodal points, but the S2
532
+ // TODO(rsned ): The error bound holds for antipodal points, but the S2
533
533
// predicates used to test the error do not support antipodal points yet.
534
534
if a1 .Vector == a0 .Mul (- 1 ) {
535
535
continue
@@ -545,22 +545,25 @@ func TestEdgeDistanceUpdateMinInteriorDistanceMaxError(t *testing.T) {
545
545
minDist := s1 .InfChordAngle ()
546
546
547
547
var ok bool
548
- if minDist , ok = UpdateMinInteriorDistance (x , a0 , a1 , minDist ); ! ok {
548
+ // TODO(rsned): The first param here should be minDist which is needed
549
+ // for the two commented out tests below. When they are implemented
550
+ // return this to "if minDist, ok == Update...."
551
+ if _ , ok = UpdateMinInteriorDistance (x , a0 , a1 , minDist ); ! ok {
549
552
iter --
550
553
continue
551
554
}
552
555
// TODO(rsned): Uncomment once predicates has CompareEdgeDistance
553
556
/*
554
- maxErr := minUpdateDistanceMaxError(minDist)
555
- if got := CompareEdgeDistance(x, a0, a1, minDist.Expanded(maxErr)); got > 0 {
556
- t.Errorf("CompareEdgeDistance(%v, %v, %v, %v) = got, want <= 0",
557
- x, a0, a1, minDist.Expanded(maxErr), got)
558
-
559
- }
560
- if got := CompareEdgeDistance(x, a0, a1, minDist.Expanded(-maxErr)); got < 0 {
561
- t.Errorf("CompareEdgeDistance(%v, %v, %v, %v) = got, want >= 0",
562
- x, a0, a1, minDist.Expanded(-maxErr), got)
563
- }
557
+ maxErr := minUpdateDistanceMaxError(minDist)
558
+ if got := CompareEdgeDistance(x, a0, a1, minDist.Expanded(maxErr)); got > 0 {
559
+ t.Errorf("CompareEdgeDistance(%v, %v, %v, %v) = got, want <= 0",
560
+ x, a0, a1, minDist.Expanded(maxErr), got)
561
+
562
+ }
563
+ if got := CompareEdgeDistance(x, a0, a1, minDist.Expanded(-maxErr)); got < 0 {
564
+ t.Errorf("CompareEdgeDistance(%v, %v, %v, %v) = got, want >= 0",
565
+ x, a0, a1, minDist.Expanded(-maxErr), got)
566
+ }
564
567
*/
565
568
}
566
569
}
0 commit comments