lib/instructions/float/float_divide.rb in nudge-0.2.6 vs lib/instructions/float/float_divide.rb in nudge-0.2.7
- old
+ new
@@ -1,4 +1,16 @@
+# pops the top 2 items of the +:float+ stack;
+# pushes a ValuePoint with their (floating point) quotient onto the +:float+ stack
+#
+# note: the top item is the denominator, the second item is the numerator
+#
+# note: will push an +:error+ ValuePoint instead of an +:int+ if the numerator is 0.0
+#
+# *needs:* 2 +:float+
+#
+# *pushes:* 1 +:float+
+#
+
class FloatDivideInstruction < Instruction
def preconditions?
needs :float, 2
end
def setup