Don't return an enum as a reference.
Define the flags and number of iterations as local variables instead
of global ones.
Better wording and set the initial value to the more generic 0 instead
of 0.0.
Better wording.
Doc.