Small update: edited my method to use the NINE constant from Marc.