Math: reduce code duplication in Functions.h.
Math: reduce code duplication in Functions.h.

ashimidashajia/magnum,MiUishadow/magnum,ashimidashajia/magnum,DerThorsten/magnum,MiUishadow/magnum,ashimidashajia/magnum,DerThorsten/magnum,MiUishadow/magnum,MiUishadow/magnum,DerThorsten/magnum,ashimidashajia/magnum,DerThorsten/magnum,MiUishadow/magnum,MiUishadow/magnum,ashimidashajia/magnum,DerThorsten/magnum