Method: LatexToUnicode.translate_sqrt
- Defined in:
- lib/translate.rb
.translate_sqrt(radicand, radical) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/translate.rb', line 34 def self.translate_sqrt(radicand, radical) case radical.to_i when 2 then "√(#{radicand})" when 3 then "∛(#{radicand})" when 4 then "∜(#{radicand})" else "#{translate(radical, SUPERSCRIPTS)}√(#{radicand})" end end |