Module: Dieses::Support::Math
- Included in:
- Dieses::Support
- Defined in:
- lib/dieses/support/math.rb
Constant Summary collapse
- GOLDEN_RATIO =
(1 + ::Math.sqrt(5)) / 2
- SILVER_RATIO =
::Math.sqrt(2)
Instance Method Summary collapse
Instance Method Details
#to_degree(radian) ⇒ Object
13 14 15 |
# File 'lib/dieses/support/math.rb', line 13 def to_degree(radian) radian * 180 / ::Math::PI end |
#to_radian(degree) ⇒ Object
9 10 11 |
# File 'lib/dieses/support/math.rb', line 9 def to_radian(degree) degree / 180 * ::Math::PI end |