class KeyhitPain::Classes::Circle

Public Class Methods

new(circle_length) click to toggle source
# File lib/keyhit_pain/classes.rb, line 156
def initialize(circle_length)
  @circle_length = circle_length
end

Public Instance Methods

radius_by_length() click to toggle source
# File lib/keyhit_pain/classes.rb, line 160
def radius_by_length
  @circle_length / (2 * 3.14)
end
square() click to toggle source
# File lib/keyhit_pain/classes.rb, line 164
def square
  ((radius_by_length**2) * 3.14).round(4)
end