private static function vectorAngle($ux, $uy, $vx, $vy)
    {
        $ta = atan2($uy, $ux);
        $tb = atan2($vy, $vx);

        if ($tb >= $ta) {
            return $tb - $ta;
        }

        return 2 * M_PI - ($ta - $tb);
    }