6 lines
91 B
Python
6 lines
91 B
Python
import math
|
|
|
|
|
|
def minimum_image(dx, box):
|
|
return dx - box * math.floor(dx / box + 0.5)
|