Class: Dither::Param
- Inherits:
-
Struct
- Object
- Struct
- Dither::Param
- Defined in:
- lib/dither/param.rb
Instance Attribute Summary collapse
-
#i ⇒ Object
Returns the value of attribute i.
-
#j ⇒ Object
Returns the value of attribute j.
Instance Method Summary collapse
Instance Attribute Details
#i ⇒ Object
Returns the value of attribute i
3 4 5 |
# File 'lib/dither/param.rb', line 3 def i @i end |
#j ⇒ Object
Returns the value of attribute j
3 4 5 |
# File 'lib/dither/param.rb', line 3 def j @j end |
Instance Method Details
#<=>(param) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/dither/param.rb', line 4 def <=>(param) return 1 if param.unbound? a = i <=> param.i if a == 0 return j <=> param.j else return a end end |
#unbound? ⇒ Boolean
15 16 17 |
# File 'lib/dither/param.rb', line 15 def unbound? false end |