Generic implementations of math helper routines and classes, that are used by more than one effect.