class BCDice::Arithmetic::Node::DivideWithRound
除算(四捨五入)のノード
Constants
- ROUNDING_METHOD
端数処理方法を示す記号
Private Instance Methods
divide_and_round(dividend, divisor, _round_type)
click to toggle source
除算および端数処理を行う @param [Integer] dividend 被除数 @param [Integer] divisor 除数(0以外) @param [Symbol] _round_type ゲームシステムの端数処理設定 @return [Integer]
# File lib/bcdice/arithmetic/node.rb, line 140 def divide_and_round(dividend, divisor, _round_type) (dividend.to_f / divisor).round end