Angle { public static Angle angleTroisPoints(IDirectPosition pt1, IDirectPosition pt2, IDirectPosition pt3) { Angle angle1 = new Angle(pt2, pt1); Angle angle2 = new Angle(pt2, pt3); Angle angle = Angle.ecarttrigo(angle1, angle2); return angle; } Angle();  Angle(double valeur);  Angle(IDirectPosition pt1, IDirectPosition pt2); double getValeur(); void setValeur(double valeur); static Angle angleAPiPres(Angle angle2pi); Angle angleAPiPres(); void ajoute(Angle a); static Angle ajoute(Angle a, Angle b); static Angle bissectrice(Angle a, Angle b); static Angle moyenne(Angle a, Angle b); static Angle ecarttrigo(Angle a, Angle b); static Angle ecart(Angle a, Angle b); static Angle angleTroisPoints(IDirectPosition pt1,
      IDirectPosition pt2, IDirectPosition pt3); static final Angle angleNul; static final Angle anglePlat; static final Angle angleDroit; }
@Test public void testAngleTroisPoints() { System.out.println("testAngleTroisPoints"); a1 = Angle.angleTroisPoints(p4, p, p1); System.out.println(a1.getValeur()); assert(Math.abs(a1.getValeur() - Math.PI) < 0.01); a2 = Angle.angleTroisPoints(p4, p, p2); System.out.println(a2.getValeur()); assert(Math.abs(a2.getValeur() - 5 * Math.PI / 4) < 0.01); a3 = Angle.angleTroisPoints(p4, p, p3); System.out.println(a3.getValeur()); assert(Math.abs(a3.getValeur() - 3 * Math.PI / 2) < 0.01); a4 = Angle.angleTroisPoints(p4, p, p4); System.out.println(a4.getValeur()); assert(Math.abs(a4.getValeur()) < 0.01); a5 = Angle.angleTroisPoints(p4, p, p5); System.out.println(a5.getValeur()); assert(Math.abs(a5.getValeur() - Math.PI / 2) < 0.01); }