title: Can you explain what this code from robocode means?
body: <p>I do not understand what this method exactly is doing. Could someone explain this trig to me?</p>
  
  <pre><code>public void onScannedRobot(ScannedRobotEvent e)
    {
      setTurnRadarLeftRadians(getRadarTurnRemaining());
  
      setTurnRight(e.getBearing() + 90.0D - dir / 33.0D);
      if (((Guppy.var = var - e.getEnergy()) &lt;= 3) &amp;&amp; (var &gt; 0.0D))
      {
        setMaxVelocity(Math.random() * 9.0D + 3);
        setAhead(Guppy.dir = dir * type);
      }
      setTurnGunRightRadians(Math.sin((Guppy.var = e.getBearingRadians() + getHeadingRadians()) - getGunHeadingRadians() + Math.asin((vel * 0.4D + e.getVelocity() * 0.6D) / 14.0D * Math.sin(e.getHeadingRadians() - var))));
      if (getGunHeat() == 0.0D)
      {
        setFire(2.9D);
        vel = e.getVelocity();
      }
      var = e.getEnergy();
    }
  </code></pre>