Class: Mageo::Sphere
- Inherits:
-
Object
- Object
- Mageo::Sphere
- Defined in:
- lib/mageo/sphere.rb
Overview
球を表現するクラス。
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#radius ⇒ Object
readonly
Returns the value of attribute radius.
Instance Method Summary collapse
-
#initialize(position, radius) ⇒ Sphere
constructor
座標と半径.
Constructor Details
Instance Attribute Details
#position ⇒ Object (readonly)
Returns the value of attribute position.
7 8 9 |
# File 'lib/mageo/sphere.rb', line 7 def position @position end |
#radius ⇒ Object (readonly)
Returns the value of attribute radius.
7 8 9 |
# File 'lib/mageo/sphere.rb', line 7 def radius @radius end |