daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest May 16th, 2018 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (x - x0)^2 + (y - y0)^2 <= R^2
  2.  
  3.    function foo(int $x, int $y){
  4.       $x0 = -2;
  5.       $y0 = 0;
  6.       $radius_min = 1;
  7.       $radius_max = 2;
  8.  
  9.       if($x >= -1){
  10.         return TRUE;
  11.       }
  12.  
  13.       $radius = sqrt(pow($x - $x0, 2) + pow($y - $y0, 2));
  14.  
  15.  
  16.       return  $radius_min <= $radius && $radius <= $radius_max;
  17.  
  18.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top