class FifthedSim::SubtractionNode

Public Class Methods

new(lhs, rhs) click to toggle source
# File lib/fifthed_sim/nodes/subtraction_node.rb, line 5
def initialize(lhs, rhs)
  @lhs = lhs
  @rhs = rhs
end

Public Instance Methods

distribution() click to toggle source
# File lib/fifthed_sim/nodes/subtraction_node.rb, line 18
def distribution
  @lhs.distribution.convolve_subtract(@rhs.distribution)
end
reroll() click to toggle source
# File lib/fifthed_sim/nodes/subtraction_node.rb, line 14
def reroll
  self.class.new(@lhs.reroll, @rhs.reroll)
end
value() click to toggle source
# File lib/fifthed_sim/nodes/subtraction_node.rb, line 10
def value
  @lhs.value - @rhs.value
end