Added find_cos method to simplify the angles method in triangle.rb