MCPcopy
hub / github.com/CiaraStrawberry/TemporalKit / nearest_multiple

Function nearest_multiple

scripts/berry_utility.py:444–445  ·  view source on GitHub ↗
(n, factor)

Source from the content-addressed store, hash-verified

442
443def resize_to_nearest_multiple_of_8(width, height):
444 def nearest_multiple(n, factor):
445 return round(n / factor) * factor
446
447 new_width = nearest_multiple(width, 8)
448 new_height = nearest_multiple(height, 8)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected