module Precisionable
Constants
- PRECISION
Public Class Methods
float_from_int(int)
click to toggle source
# File lib/precisionable.rb, line 8 def self.float_from_int(int) (int.to_f / PRECISION) end
int_from_float(float)
click to toggle source
# File lib/precisionable.rb, line 4 def self.int_from_float(float) (float.to_f * PRECISION).round end