protected function polarToCartesian($radius, $angleInDegrees)
    {
        $angleInRadians = $angleInDegrees * M_PI / 180.0;

        return array(
            $this->size / 2 + ($radius * cos($angleInRadians)),
            $this->size / 2 + ($radius * sin($angleInRadians)),
        );
    }
protected function polarToCartesian($radius, $angleInDegrees)
    {
        $angleInRadians = $angleInDegrees * M_PI / 180.0;

        return array(
            $this->size / 2 + ($radius * cos($angleInRadians)),
            $this->size / 2 + ($radius * sin($angleInRadians)),
        );
    }
protected function polarToCartesian ( $ radius , $ angleInDegrees ) { $ angleInRadians = $ angleInDegrees * M_PI / 180.0 ; return array ( $ this -> size / 2 + ( $ radius * cos ( $ angleInRadians ) ) , $ this -> size / 2 + ( $ radius * sin ( $ angleInRadians ) ) , ) ; }
Calculate the x,y coordinate of a given angle at a given distance from the center

0 Degree is 3 o'clock

@param float $radius
@param float $angleInDegrees

@return array
Calculate the x y coordinate of a given angle at a given distance from the center