Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Namespace Bonding
- {
- USE \Action\Throwable AS Throwable;
- define('DADS_LOCATION', array(1, 1));
- define('STATIC_POINT', 5);
- Class Ball Extends Throwable
- {
- public $target, $ball;
- private $location = array();
- // get your own bonding moment asshole
- private function __clone {}
- public function __construct($target)
- {
- $this->target = $target;
- $this->ball = $ball;
- parent::__construct($this);
- }
- public function aim()
- {
- if ($this->ball instanceof Ball)
- {
- try {
- parent::throws($this->ball);
- } catch (Exception $ball) {
- $this->target($this->ball);
- }
- if (! empty($this->target)) $this->aim());
- }
- }
- private function target()
- {
- if ($this->ball instanceof Ball)
- {
- $dx = 0;
- $dy = 0;
- $ex = DADS_LOCATION[0] * DADS_LOCATION[1];
- $ey = DADS_LOCATION[1] * STATIC_POINT;
- $a = DADS_LOCATION[0];
- $b = DADS_LOCATION[1];
- $c = STATIC_POINT;
- $cosd = $ex * $b;
- $cosfi = (($a ^ 2) + ($b ^ 2) - ($c ^ 2) / (2 * $a * $b));
- $d = acos($cosd);
- $fi = acos($cosfi);
- return $fi - $d;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment