#31 Angle.interiorAngle behavior

open
nobody
None
5
2012-11-16
2012-11-16
No

Coordinate a = new Coordinate(1, 1);
Coordinate b = new Coordinate(1, 0);
Coordinate c = new Coordinate(0, 1);

System.out.println(Angle.toDegrees(Angle.interiorAngle(a, b, c))); // Must be 45° => OK
System.out.println(Angle.toDegrees(Angle.interiorAngle(c, b, a))); // Must be 45° => OK
System.out.println(Angle.toDegrees(Angle.interiorAngle(a, c, b))); // Must be 45° => OK
System.out.println(Angle.toDegrees(Angle.interiorAngle(b, c, a))); // Must be 45° => OK
System.out.println(Angle.toDegrees(Angle.interiorAngle(b, a, c))); // Must be 90° => KO (return 270° !?!?)
System.out.println(Angle.toDegrees(Angle.interiorAngle(c, a, b))); // Must be 90° => KO (return 270° !?!?)

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks