Class: WrfLibrary::Entity::Coordinate
- Inherits:
-
Object
- Object
- WrfLibrary::Entity::Coordinate
- Defined in:
- lib/wrf_library/entity/coordinate.rb
Overview
Simple coordinate class, that can have any combination of numbers for the considered tupel:
-
(int, int) indicates a coordinate on a grid as (x,y)
-
(float, float) indicates a geo coordinate as (lon, lat)
Instance Attribute Summary collapse
-
#x ⇒ Number
readonly
The first coordinate of the tupel, commonly the abscissa.
-
#y ⇒ Number
readonly
The second coordinate of the tupel, commonly the ordinate.
Instance Method Summary collapse
-
#initialize(x, y) ⇒ Coordinate
constructor
initialization.
Constructor Details
#initialize(x, y) ⇒ Coordinate
initialization
21 22 23 24 |
# File 'lib/wrf_library/entity/coordinate.rb', line 21 def initialize(x, y) @x = x @y = y end |
Instance Attribute Details
#x ⇒ Number (readonly)
Returns the first coordinate of the tupel, commonly the abscissa.
14 15 16 |
# File 'lib/wrf_library/entity/coordinate.rb', line 14 def x @x end |
#y ⇒ Number (readonly)
Returns the second coordinate of the tupel, commonly the ordinate.
16 17 18 |
# File 'lib/wrf_library/entity/coordinate.rb', line 16 def y @y end |