[ create a new paste ] login | about

Link: http://codepad.org/UIvgBnOr    [ raw code | output | fork ]

PHP, pasted on Oct 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

$b = 10;
$angle1 = -179;
$angle2 = 179;

$diff = $angle1 - $angle2;
if(abs($diff % 360) <= $b) {
  echo "yes";
} else {
  echo "no";
}

?>


Output:
1
no


Create a new paste based on this one


Comments: