Sha256: 1bca008ef3fd1c828e9982583978161ae19418f94f046d859d2781ee1df683f0

Contents?: true

Size: 634 Bytes

Versions: 17

Compression:

Stored size: 634 Bytes

Contents

# frozen_string_literal: true

require_relative "unary_function"

module Plurimath
  module Math
    module Function
      class Floor < UnaryFunction
        def to_latex
          "\\lfloor #{parameter_one.to_latex} \\rfloor"
        end

        def to_mathml_without_math_tag
          first_value = parameter_one&.to_mathml_without_math_tag
          Utility.update_nodes(
            Utility.ox_element("mrow"),
            [
              Utility.ox_element("mo") << "&#x230a;",
              first_value,
              Utility.ox_element("mo") << "&#x230b;",
            ],
          )
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
plurimath-0.3.7 lib/plurimath/math/function/floor.rb
plurimath-0.3.6 lib/plurimath/math/function/floor.rb
plurimath-0.3.5 lib/plurimath/math/function/floor.rb
plurimath-0.3.4 lib/plurimath/math/function/floor.rb
plurimath-0.3.3 lib/plurimath/math/function/floor.rb
plurimath-0.3.2 lib/plurimath/math/function/floor.rb
plurimath-0.3.1.2 lib/plurimath/math/function/floor.rb
plurimath-0.3.1 lib/plurimath/math/function/floor.rb
plurimath-0.3.0 lib/plurimath/math/function/floor.rb
plurimath-0.2.9 lib/plurimath/math/function/floor.rb
plurimath-0.2.8 lib/plurimath/math/function/floor.rb
plurimath-0.2.7 lib/plurimath/math/function/floor.rb
plurimath-0.2.6 lib/plurimath/math/function/floor.rb
plurimath-0.2.5 lib/plurimath/math/function/floor.rb
plurimath-0.2.4 lib/plurimath/math/function/floor.rb
plurimath-0.2.3 lib/plurimath/math/function/floor.rb
plurimath-0.2.2 lib/plurimath/math/function/floor.rb