Sha256: b45975b2d9348b68ab592619b302a2efaadbe879f225cf53f71a0ba2c2475cb9

Contents?: true

Size: 617 Bytes

Versions: 9

Compression:

Stored size: 617 Bytes

Contents

# frozen_string_literal: true

require_relative "unary_function"

module Plurimath
  module Math
    module Function
      class Ceil < UnaryFunction
        def to_latex
          "{\\lceil #{latex_value} \\rceil}"
        end

        def to_mathml_without_math_tag
          left_value = Utility.ox_element("mo") << "&#x2308;"
          first_value = mathml_value&.insert(0, left_value)
          right_value = Utility.ox_element("mo") << "&#x2309;"
          Utility.update_nodes(
            Utility.ox_element("mrow"),
            first_value << right_value,
          )
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
plurimath-0.3.7 lib/plurimath/math/function/ceil.rb
plurimath-0.3.6 lib/plurimath/math/function/ceil.rb
plurimath-0.3.5 lib/plurimath/math/function/ceil.rb
plurimath-0.3.4 lib/plurimath/math/function/ceil.rb
plurimath-0.3.3 lib/plurimath/math/function/ceil.rb
plurimath-0.3.2 lib/plurimath/math/function/ceil.rb
plurimath-0.3.1.2 lib/plurimath/math/function/ceil.rb
plurimath-0.3.1 lib/plurimath/math/function/ceil.rb
plurimath-0.3.0 lib/plurimath/math/function/ceil.rb