Age | Commit message (Collapse) | Author |
|
clang rightfully complained about this, these are floats
|
|
Due to floating point errors this loop would occasionally miss
the last spoke as-is.
A quick fix is to just round down the accumulator before
comparing it... this function in general needs to all be cleaned
up, esp. since the conversion to floats.
An obvious repro of this issue, fixed by this commit:
'--module=spokes,iterations=2,count=3,twist=0.125,thickness=2' \
'--video=sdl,ratio=full,fullscreen=off,vsync=on,size=640x480'
The low count of 3 makes the missing spoke quite visible...
|
|
This switches the perimeter and stride math to use floating
point, done in a kind of fast and nasty naive substitution
manner.
That's necessary for getting away from the even stride
calculation / spokes calculation in favor of supporting arbitrary
spoke counts, without introducing discontinuities at the
boundaries of the mirrored sides
The new setting is count= with a handful of reasonable presets.
It's a little awkward since this is expressed as half the actual
count, naming could probably be improved.
|
|
This isn't actually needed just for the settings now that
til_module_context_t.setup always has a reference to the baked
setup, and always gets created even if there's no bespoke context
created.
|
|
Let's not handle negative values for these in the setup, even if
it's all multiple choice options that don't include erroneous
negatives. Technically you can feed in whatever using the ":"
force prefix...
|
|
This module started out as a way to test a line drawing algorithm, but
ended up looking interesting enough to include as a module of it's own.
#ZephyrCommit #BirdwalkCommit
|