this post was submitted on 01 Sep 2026
512 points (98.7% liked)
Programming
28351 readers
1199 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Haha nice! How long did it take you? Integer-only math?
All computer math is integer math if you go deep enough
I'm sure implementing floating point directly in bash would work great
I didn't have the patience to do it myself bit wanted to see just how complex it would get:
1440 multiplications per second on my computer!
Wow, over a kiloflop!
hahaha you seem to be familiar with the issues I ran across
Invert the gravity value and then all the dice will be floating point 🫣
Jebus I don't even know how long I've been working on this. It started out as a way to teach myself bash, combined with my long obsession with rendering platonic solids. I previously coded a huge galaxy of hundreds of thousands of polyhedra you could fly across in python with opengl shaders and got to reuse/translate a lot of that code. The quaternion stuff I was grateful to not have to rethink that much again. haha. And yes, integer-only! Some params are "floating point" but i just parse them and add a bunch of zeroes so i can later do all the operations with equally blown up values of pi and trig stuff from "lookup tables" (case matching).
Btw, you could pipe it to
bcfor the odd float. Or even some complex math. Just in case you didn't know.yeah, I was trying to stay as pure-bash as possible, but thanks!
Strong Amiga coding vibes.