Sha256: 3f8d5c810192e46868454313907ae3191fc9fcd94952a9ce70b64bc8f12d0840
Contents?: true
Size: 320 Bytes
Versions: 9
Compression:
Stored size: 320 Bytes
Contents
# frozen_string_literal: true class MathCaster < Sinclair::Caster cast_with(:float, :to_f) cast_with(:log) do |value, base: 10| value = MathCaster.cast(value, :float) Math.log(value, base) end cast_with(:exp) do |value, base: 10| value = MathCaster.cast(value, :float) base**value end end
Version data entries
9 entries across 9 versions & 1 rubygems