added dpad inputs, some math helpers and fixed the weird magic numbers in the unput manager