Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 525 Bytes

File metadata and controls

18 lines (13 loc) · 525 Bytes

Description

This series of katas will introduce you to basics of doing geometry with computers.

Point objects have x, y attributes. Circle objects have center which is a Point, and radius, which is a number.

Write a function calculating circumference of a Circle.

Tests round answers to 6 decimal places.

My Solution

def circle_circumference(circle)
  2 * Math::PI * circle.radius
end