The original code had several issues that have been addressed in this
commit. First, the function is never called from the coin function so
having this logic there is unnecessary and adding clutter. Second,
calculating the entire standard deviation as a single formula is
confusing and extremely hard to read and debug, so this was split
onto multiple lines. Finally, the method of calculating the variance
for use with the standard deviation was a longer and more roundabout
way of finding it. This was replaced with an equivalent but shorter
and more concise formula.
On branch gonzobot+gaming
Changes to be committed:
modified: plugins/gaming.py
The original code had several issues that have been addressed in this commit. First, the function is never called from the coin function so having this logic there is unnecessary and adding clutter. Second, calculating the entire standard deviation as a single formula is confusing and extremely hard to read and debug, so this was split onto multiple lines. Finally, the method of calculating the variance for use with the standard deviation was a longer and more roundabout way of finding it. This was replaced with an equivalent but shorter and more concise formula.
On branch gonzobot+gaming Changes to be committed: modified: plugins/gaming.py