public float xyangle(Coord3f o) {
   Coord3f c = o.sub(this);
   if (c.x == 0) {
     if (c.y < 0) {
       return ((float) -PI / 2);
     } else {
       return ((float) PI / 2);
     }
   } else {
     if (c.x < 0) {
       if (c.y < 0) {
         return ((float) (-PI + Math.atan(c.y / c.x)));
       } else {
         return ((float) (PI + Math.atan(c.y / c.x)));
       }
     } else {
       return ((float) Math.atan(c.y / c.x));
     }
   }
 }
Exemple #2
0
 public boolean equals2(Object o) {
   if (!(o instanceof ED)) return (false);
   ED e = (ED) o;
   return ((t == e.t) && at.equals(e.at) && res.res.equals(e.res.res) && off.equals(e.off));
 }