nandeck-ruby/lib/nandeck/conversions.rb
2013-10-09 22:51:03 -04:00

20 lines
295 B
Ruby

module Nandeck
module Conversions
def point_to_pixel(point)
point * 300.0 / 72.0
end
def pixel_to_point(pixel)
pixel * 72.0 / 300.0
end
def inches_to_points(inch)
inch * 72.0
end
def points_to_inches(point)
point / 72.0
end
end
end