Class MesMath

java.lang.Object
   |
   +----MesMath

abstract class MesMath
extends Object
The MesMath class is an abstract class that is used to perform division related operations on integers. I haven't been able to tell java that I needed my divisions to be rounded toward minus infinity rather than zero, so I've had to do it myself.


Constructor Index

 o MesMath()

Method Index

 o div(int, int)
This function takes two integers and return the division of a by b with respect to rounding toward minus inifinity.
 o mod(int, int)
This function is the remainder counterpart to the div function above.

Constructors

 o MesMath
 MesMath()

Methods

 o div
 public static int div(int a,
                       int b)
This function takes two integers and return the division of a by b with respect to rounding toward minus inifinity. For example, div (-1, 2) returns -1.

 o mod
 public static int mod(int a,
                       int b)
This function is the remainder counterpart to the div function above.