Sha256: b7247e945c51b7b2d20f992d083fff87803afb90843c647caa3b568a8adb662b
Contents?: true
Size: 719 Bytes
Versions: 3
Compression:
Stored size: 719 Bytes
Contents
# pops the top items of the +:float+ and +:int+ stacks; # pushes the +:float+ down "into" the stack, at a level determined by the +:int+ "destination" value. # # If the destination value is negative or 0, the item stays on top; # if the destination value is greater than or equal to the depth of the stack, the item goes to the bottom; # otherwise, the item is inserted farther from the stack's top as the destination value increases. # # note: the destination depth is calculated after the items have been popped # # *needs:* 1 +:float+, 1 +:int+ # # *pushes:* 1 +:float+ (sortof) # class FloatShoveInstruction < Instruction include ShoveInstruction def initialize(context) super(context, :float) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nudge-0.2.9 | lib/instructions/float/float_shove.rb |
nudge-0.2.8 | lib/instructions/float/float_shove.rb |
nudge-0.2.7 | lib/instructions/float/float_shove.rb |