Sha256: 3198439f20ecc825bfe03791af5a127a022164b7d889a2fdf6844939915aabb3
Contents?: true
Size: 275 Bytes
Versions: 16
Compression:
Stored size: 275 Bytes
Contents
class Numeric # Determines if another number is approximately equal # within a given _n_th degree. Defaults to 100ths # if the degree is not specified. # # CREDIT: Trans def approx?(x, n=0.01) return(self == x) if n == 0 (self - x).abs <= n end end
Version data entries
16 entries across 15 versions & 1 rubygems