@death I demand oil on canvas!
Considering a generic function, that accepts a count of numbers (usual + - * / algebra) and returns their average (sum over count), what requirements make sense to be imposed on the number to allow division by count?
(count is 2 in example pseudo code)
1. explicit construction from a single natural number:
(n1 + n2)/number(2)
2. straight up a division operator that accepts a natural number as second argument:
(n1 + n2)/2
3. multiplication identity constructor/value that can be accumulated (using addition) to reach count:
(n1 + n2)/(number::one + number::one)
4. addition operator that accepts a natural number as second argument (assuming zero/default constructor available):
(n1 + n2)/(number() + 2)
#cpp #programming #generic_programming
@fedisearch where is the source code?
#xoshiro is a family of #publicdomain (#CC0) pseudorandom number generators.
xoshiro (xor-shift-rotate) and #xoroshiro (xor-rotate-shift-rotate) are public domain #algorithms that shift state to produce very random numbers at high speeds suitable for insecure applications. The algorithms only use a few bytes of state and are suitable for embedded applications which require good pseudorandom numbers.
Website 🔗️: http://prng.di.unimi.it/
here is the code https://codeberg.org/tuxcrafting/sndshooter
To a profession that is 90% naming, lerp is an embarrassment. What shall I call it instead?
map(zero, one, value)
progress(begin, end, amount)
way(from, to, ratio)
linin(hammer, sickle, stilin)
/* had to put these here cause of stupid character limit on poll options */
None of you understand my plight...
how do YOU split?
me - next time, can we make something at least remotely tangible?
brain - what's the fun in that?
me - how did we even get here?
brain - long story, but basically you lied and we had to fix things to make your lies true.
me - :|
brain - :|
me - >:(