class Vissen::Output::Vixel
The `Vixel` (Vissen
pixel) represents the two dimensional representation of each grid pixel, for each grid. Each vixel has an intensity (i) and a palette position (p), both with values in the range 0..1.
TODO: How do we want the vixel to saturate? When written or when read?
Attributes
i[RW]
@return [Float] the vixel intensity.
p[RW]
@return [Float] the vixel palette position.
Public Class Methods
new(i = 0.0, p = 0.0)
click to toggle source
@param i [Numeric] the vixel intensity. @param p [Numeric] the vixel palette position.
# File lib/vissen/output/vixel.rb, line 19 def initialize(i = 0.0, p = 0.0) self.i = i self.p = p end
Public Instance Methods
==(other)
click to toggle source
@param other [Object] the object to check equality against. @return [true,false] true if the other object has the same intensity and
palette position.
# File lib/vissen/output/vixel.rb, line 27 def ==(other) @i == other.i && @p == other.p rescue NoMethodError false end
inspect()
click to toggle source
@return [String] a string representation of the vixel.
# File lib/vissen/output/vixel.rb, line 34 def inspect format '(%.1f, %.1f)', @i, @p end