Join Nostr
2024-11-17 15:18:00 UTC

Dan Stowell on Nostr: My first algorithm in #uxn: the one-dimensional distance between two values. It might ...

My first algorithm in #uxn: the one-dimensional distance between two values. It might not look like much but I'm pleased to have worked it out:
%MIN { LTHk #01 JCN SWP POP } ( b c -- retval )
%dist1d { SUBk SWP ROT SUB MIN } ( b c -- dist )