Skip to content

Instantly share code, notes, and snippets.

@russellaugust
Created November 22, 2020 07:56
Show Gist options
  • Save russellaugust/c59a629f954966a4e2f7106742bb6dc3 to your computer and use it in GitHub Desktop.
Save russellaugust/c59a629f954966a4e2f7106742bb6dc3 to your computer and use it in GitHub Desktop.
'''
evenly distributes n amount of numbers between x and y.
x and y are included in n's total
'''
def evenly_distribute(start, end, n):
step = (end - start) / (n - 1)
frames = [start + step * i for i in range(n)]
return (frames)
if __name__ == "__main__":
x = 1602126756.97911 # in number
y = 1602129780.24273 # out number
n = 11 # amount of numbers, including x and y
results = evenly_distribute(x, y, n)
print(results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment