From: Alexander B. Schmidt Date: Sat, 3 Nov 2012 21:42:19 +0000 (+0100) Subject: ... X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/ffe901ccc64a97c835f5be719b8ee9eee8578669 ... --- diff --git a/progress.cpp b/progress.cpp index 31d4859..57d1bc3 100644 --- a/progress.cpp +++ b/progress.cpp @@ -16,3 +16,8 @@ bool progress::madeStep(int realStep) else return false; } + +double progress::done() +{ + return (double)laststep/progsteps; +} diff --git a/progress.h b/progress.h index 44b6f94..da6854e 100644 --- a/progress.h +++ b/progress.h @@ -6,6 +6,7 @@ class progress public: progress(int a_realsteps, int a_progsteps=100); bool madeStep( int realStep ); + double done(); private: int realsteps;