Sha256: 79a0da92d2ff9a20742c3d76398d6ac85f9a9b98f91418aa4ba1227a32d57ebb

Contents?: true

Size: 259 Bytes

Versions: 3

Compression:

Stored size: 259 Bytes

Contents

module Danica
  class Cos < Operator
    variables :variable

    def to_f
      Math.cos(variable.to_f)
    end

    private

    def tex_string
      "cos(#{variable.to_tex})"
    end

    def gnu_string
      "cos(#{variable.to_gnu})"
    end
  end
end



Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danica-2.0.4 lib/danica/cos.rb
danica-2.0.3 lib/danica/cos.rb
danica-2.0.2 lib/danica/cos.rb