Elektrine lite

← Feed

@pulkomandy@mastodon.tetaneutral.net

Post #4270282

2026-07-30 09:34 UTC

@amanda@social.spejset.org Given a polar coordinate (a = angle, d = distance): x = d . cos(a) y = d . sin(a) Round as needed to get integers. I'm not sure how people manage to make this sound complicated? Or do I misunderstand the question?

Replies (1)

  • @amanda@social.spejset.org 2026-07-31 07:39

    @pulkomandy@mastodon.tetaneutral.net they start introducing complicated interpolation or nearest neighbour etc in the ”plus rounding” part. I was hoping to use integer tables of precomputed numbers or something, which should be possible. It felt very ”this must have a solution that doesn’t take the shortcut past floats”. My supervisor works on floating point number verification and I have a phobia of floats now.

    Open ##4270280