Package uk.ac.manchester.spinnaker.utils
Class MathUtils
java.lang.Object
uk.ac.manchester.spinnaker.utils.MathUtils
Miscellaneous mathematical functions.
- Author:
- Donal Fellows
- 
Method Summary
- 
Method Details- 
ceildivpublic static final int ceildiv(int numerator, int denominator) Divide one integer by another with rounding up. For example,ceildiv(5,3) == 2- Parameters:
- numerator- The value to be divided. Must be non-negative.
- denominator- The value to divide by. Must be positive.
- Returns:
- The value got by dividing the two, and rounding any floating remainder up.
 
- 
hexbyteConverts a byte to its hexadecimal representation.- Parameters:
- value- The byte to convert.
- Returns:
- The (unsigned) hexadecimal representation of the byte.
 
 
-