Class: Bayonetta::EXPFile::Operation
- Inherits:
-
LibBin::Structure
- Object
- LibBin::Structure
- Bayonetta::EXPFile::Operation
- Defined in:
- lib/bayonetta/exp.rb
Instance Method Summary collapse
-
#initialize ⇒ Operation
constructor
A new instance of Operation.
- #transform_value(v) ⇒ Object
Constructor Details
#initialize ⇒ Operation
Returns a new instance of Operation.
340 341 342 343 |
# File 'lib/bayonetta/exp.rb', line 340 def initialize @flags = 0 @value = 0.0 end |
Instance Method Details
#transform_value(v) ⇒ Object
345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/bayonetta/exp.rb', line 345 def transform_value( v ) if @flags == 0x4 v *= @value elsif @flags == 0x20004 v = v.abs * @value elsif @flags == 0x1 v += @value else raise "Unknown operation #{ "%x" % @flags }, please report!" end v end |