Sha256: 6e98a1165821cccbf8c1f0dec606925a4c94f9408fd34a378eaec7968dfd8b2f
Contents?: true
Size: 219 Bytes
Versions: 6
Compression:
Stored size: 219 Bytes
Contents
require_relative '../function' Dentaku::AST::Function.register(:roundup, :numeric, ->(numeric, precision=0) { tens = 10.0**precision result = (numeric * tens).ceil / tens precision <= 0 ? result.to_i : result })
Version data entries
6 entries across 6 versions & 1 rubygems