# File lib/Dnsruby/resource/LOC.rb, line 71 def latlon2dms(rawmsec, hems) # Tried to use modulus here, but Perl dumped core if # the value was >= 2**31. abs = (rawmsec - REFERENCE_LATLON).abs; deg = (abs / CONV_DEG).round; abs -= deg * CONV_DEG; min = (abs / CONV_MIN).round; abs -= min * CONV_MIN; sec = (abs / CONV_SEC).round; # $conv_sec abs -= sec * CONV_SEC; msec = abs; hem = hems[(rawmsec >= REFERENCE_LATLON ? 0 : 1), 1] return sprintf("%d %02d %02d.%03d %s", deg, min, sec, msec, hem); end