add document for the helper function at Math.h

@karlnapf,
Take a look at this.
I will send another PR for the example program