Sha256: 8b67af3447acec247e53fe45586e50c5d5644dca751a5a2873bf97a12fe68c12
Contents?: true
Size: 425 Bytes
Versions: 3
Compression:
Stored size: 425 Bytes
Contents
# pops the top item of the +:float+ stack; # pushes a ValuePoint with its sine onto the +:float+ stack # # *needs:* 1 +:float+ # # *pushes:* 1 +:float+ # class FloatSineInstruction < Instruction def preconditions? needs :float, 1 end def setup @arg1 = @context.pop_value(:float) end def derive @result = ValuePoint.new("float", Math.sin(@arg1)) end def cleanup pushes :float, @result end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nudge-0.2.9 | lib/instructions/float/float_sine.rb |
nudge-0.2.8 | lib/instructions/float/float_sine.rb |
nudge-0.2.7 | lib/instructions/float/float_sine.rb |