Class: Raster::Vector
- Inherits:
-
Struct
- Object
- Struct
- Raster::Vector
- Defined in:
- lib/skrift/raster.rb
Instance Attribute Summary collapse
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
Instance Attribute Details
#x ⇒ Object
Returns the value of attribute x
4 5 6 |
# File 'lib/skrift/raster.rb', line 4 def x @x end |
#y ⇒ Object
Returns the value of attribute y
4 5 6 |
# File 'lib/skrift/raster.rb', line 4 def y @y end |
Instance Method Details
#*(f) ⇒ Object
5 |
# File 'lib/skrift/raster.rb', line 5 def*(f) = Vector[x*f,y*f] |
#+(o) ⇒ Object
6 |
# File 'lib/skrift/raster.rb', line 6 def+(o) = Vector[x+o[0],y+o[1]] |
#-(o) ⇒ Object
7 |
# File 'lib/skrift/raster.rb', line 7 def-(o) = Vector[x-o[0],y-o[1]] |
#min ⇒ Object
8 |
# File 'lib/skrift/raster.rb', line 8 def min = (x < y ? x : y) |