Sha256: d54a60a2c45c72a119ef2b8fcbe6a9b131f26c0338096b85e8cb2e03b0e67773
Contents?: true
Size: 437 Bytes
Versions: 3
Compression:
Stored size: 437 Bytes
Contents
# frozen_string_literal: true module Danica class Operator::Power < Operator variables :base, :exponent default_value :is_grouped?, false def to_f base.to_f**exponent.to_f end def to_tex(**options) "#{wrap_as_group(base).to_tex(options)}^{#{exponent.to_tex(options)}}" end def to_gnu(**options) "#{wrap_as_group(base).to_gnu(options)}**(#{exponent.to_gnu(options)})" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
danica-2.7.7 | lib/danica/operator/power.rb |
danica-2.7.6 | lib/danica/operator/power.rb |
danica-2.7.5 | lib/danica/operator/power.rb |