Sha256: 45c6d6f33154d7abbe31fbca7c9415d85cedeca50e95de95fb7ef928b326a08d

Contents?: true

Size: 350 Bytes

Versions: 3

Compression:

Stored size: 350 Bytes

Contents

module Dydx
  module Algebra
    module Set
      class Sin < Base
        attr_accessor :x

        def initialize(x)
          @x = x
        end

        def to_s
          "sin( #{x.to_s} )"
        end

        def differentiate(sym=:x)
          cos(x) * x.d(sym)
        end
        alias_method :d, :differentiate
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dydx-0.1.31 lib/dydx/algebra/set/sin.rb
dydx-0.1.3 lib/dydx/algebra/set/sin.rb
dydx-0.1.29 lib/dydx/algebra/set/sin.rb