avatar
L Break Into Program @breakintoprogram.co.uk

I can switch the offending code to use floats, but as you can see, the rotation slows down somewhat. Regardless, the z88dk maths libraries are doing a sterling job there. That's done partly using floats, and sin and cos from maths.h. It'll be much faster once I've given it the asm treatment.

Video thumbnail
aug 29, 2025, 10:13 pm • 15 0

Replies

avatar
L Break Into Program @breakintoprogram.co.uk

Okay folks, there was a quick fix - use a long in the perspective calculation and leave the rotation as int.

aug 29, 2025, 10:47 pm • 6 0 • view
avatar
bugbear6502.bsky.social @bugbear6502.bsky.social

Working on high resolution typesetter code (up to 3600 pixels per inch, up to 36"), coding on a 68020, we used 24.8 fixed point as our main representation. It's really hard to keep integer maths pixel accurate, but when you've got 8 spare bits, life get easier. (this was 1986/87)

aug 30, 2025, 7:43 am • 3 0 • view