diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-05-08 22:06:03 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-05-08 22:06:03 -0400 |
commit | e32bfd93d210c73c783ca1b9ae2d0cae091df90b (patch) | |
tree | 0d199e6534e33006ae4563e6a610ff159304c726 /GradeBook_lib.tcl | |
parent | 2992970653d9577e1cbfe5f0f938d3201f12a976 (diff) | |
download | GradeBook-2.0.2.tar.gz GradeBook-2.0.2.zip |
added proper rounding for the final gradesv2.0.2
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 4a2e93f..340bed2 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -671,6 +671,8 @@ proc action2atributes { action_name } { proc number2letter_grade { num } { # grading_scheme MUST be sorted in descending order! + # here we do proper percent rounding + set num [expr {round(100.0*$num)/100.0}] set grading_scheme [get_grading_scheme] foreach {letter threshold} $grading_scheme { if { $num >= $threshold } { |