added a new within() method to utils and two PI constants