Class: RubyVor::Point
- Inherits:
-
Object
- Object
- RubyVor::Point
- Defined in:
- lib/ruby_vor/point.rb
Instance Attribute Summary collapse
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(x = 0.0, y = 0.0) ⇒ Point
constructor
A new instance of Point.
Constructor Details
#initialize(x = 0.0, y = 0.0) ⇒ Point
Returns a new instance of Point.
4 5 6 7 |
# File 'lib/ruby_vor/point.rb', line 4 def initialize(x=0.0,y=0.0) @x = x @y = y end |
Instance Attribute Details
#x ⇒ Object
Returns the value of attribute x.
3 4 5 |
# File 'lib/ruby_vor/point.rb', line 3 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
3 4 5 |
# File 'lib/ruby_vor/point.rb', line 3 def y @y end |
Class Method Details
.test_large ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/ruby_vor/point.rb', line 10 def test_large a = [] 1000000.times { a << new(100000.0 * rand, 100000.0 * rand) } a end |