mirror of
https://github.com/c0decracker/video-splitter.git
synced 2026-01-23 02:24:16 +00:00
docs: Improve docstring for ceil helper func
This commit is contained in:
parent
0825ff4571
commit
74628e3282
1 changed files with 11 additions and 1 deletions
|
|
@ -108,7 +108,17 @@ def get_video_length(filename):
|
|||
return video_length
|
||||
|
||||
|
||||
def ceildiv(a, b):
|
||||
def ceildiv(a: float, b: float) -> float:
|
||||
"""Helper function to simplify ceiling division.
|
||||
|
||||
See math.ceil for more information.
|
||||
Args:
|
||||
a (float): The dividend.
|
||||
b (float): The divisor, must be strictly > 0.
|
||||
|
||||
Returns:
|
||||
float: The quotient of a and b.
|
||||
"""
|
||||
return int(math.ceil(a / float(b)))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue