Пример #1
0
 public void mousecoord(Atom[] args) {
   mousecoord = new float[] {args[0].toFloat(), args[1].toFloat(), args[2].toFloat()};
   double r =
       Math.sqrt(
           (args[0].toFloat() * args[0].toFloat()) + (args[1].toFloat() * args[1].toFloat()));
   double d = Math.atan2(args[1].toFloat(), args[0].toFloat());
 }
Пример #2
0
    public boolean stopdrag(float[] mc) {
      double r = Math.sqrt((mc[0] * mc[0]) + (mc[1] * mc[1]));
      double d = Math.atan2(mc[1], mc[0]);

      polar[0] = (Math.round(d * 100.00)) / 100.00;
      polar[1] = r;

      return r > 0.8;
    }
Пример #3
0
    SeqNode(float _x, float _y, float _z, float _size, String _name) {
      coords = new float[] {_x, _y, _z};

      double r = Math.sqrt((_x * _x) + (_y * _y));
      double d = Math.atan2(_y, _x);

      polar = new double[] {d, r};
      polar[0] = (Math.round(d * 100.00)) / 100.00;

      size = _size;
      hover = false;
      triggered = false;
      selected = false;
      name = _name;
    }