corrected formula for calculating x and y in sprite function
Merge pull request #551 from moehabib/spritePadding

corrected formula for calculating x and y in sprite function