Skip to content

Instantly share code, notes, and snippets.

@Vaduz
Created December 29, 2014 11:21
Show Gist options
  • Save Vaduz/6d907338771697205178 to your computer and use it in GitHub Desktop.
Save Vaduz/6d907338771697205178 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
while line = STDIN.gets
#puts line
fields = line.split(' ')
if fields[4].to_f < 0
fields[4] = fields[4].to_f + 180.0
elsif fields[4].to_f > 0
fields[4] = fields[4].to_f - 180.0
end
puts fields.join(' ')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment