Dec-14-2016, 12:49 AM
Modulo method:
(time-start) % 24 < (stop-start) % 24For instance on a 12-hour clock:
Output:# from 2 to 10:
>>> [(x-2)%12 < (10-2)%12 for x in range(12)]
[False, False, True, True, True, True, True, True, True, True, False, False]
# from 10 to 2:
>>> [(x-10)%12 < (2-10)%12 for x in range(12)]
[True, True, False, False, False, False, False, False, False, False, True, True]
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net