Fix bug 1828

https://processing-js.lighthouseapp.com/projects/41284-processingjs/tickets/1828-nfc-with-negative-numbers-returns-incorrect-results-136