Sha256: 5a6b86a97f37702a3949e01425a8837c9d3a13ecef1a258ccd7bbc6311e31bf9

Contents?: true

Size: 320 Bytes

Versions: 1

Compression:

Stored size: 320 Bytes

Contents

module Danica
  class Function::Baskara < Function.build(:a, :b, :c) { numerator / denominator }

    private

    def numerator
       negative(b) + PositiveNegative.new(squared_root(delta))
    end

    def denominator
      number(2) * a
    end

    def delta
      power(b, 2) - product(4, a, c)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danica-2.2.1 spec/support/models/functions/baskara.rb