Skip to content

Commit b1f4c96

Browse files
committed
Added some comments
1 parent a116d7a commit b1f4c96

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/windows/export.py

+4
Original file line numberDiff line numberDiff line change
@@ -931,12 +931,16 @@ def titlestring(sec, fps, mess):
931931
if ((frame % progressstep) == 0) or ((end_time_export - last_exported_time) > 1):
932932
new_part = (frame - start_frame_export) * 1.0 / (end_frame_export - start_frame_export)
933933
if ((new_part - old_part) > 0.0):
934+
# the log10 of the difference of the fraction of the completed frames is the negativ
935+
# number of digits after the decimal point after which the first digit is not 0
934936
afterpoint = math.ceil( -2.0 - math.log10( new_part - old_part ))
935937
else:
936938
afterpoint = 1
937939
if afterpoint < 1:
940+
# We want at least 1 digit after the decimal point
938941
afterpoint = 1
939942
if afterpoint > 5:
943+
# We don't want not more than 5 difits after the decimal point
940944
afterpoint = 5
941945
old_part = new_part
942946
progress_format = "%4." + str(afterpoint) + "f%% "

0 commit comments

Comments
 (0)