i am messing with a retro - like concept, where i have everything's position rounded to the nearest whole(via CFrame) and have their orientation is rounded to nearest 45 degrees, or 2pi / 4 in radians(also via CFrame). I am encountering problems with the latter as i am yet to find a good way to round it to the nearest 2pi / 8(since it is in radians, the math.floor thing is practically rendered useless). Currently i am alternating between two methods, which are:
1: converting an object's rotation(in radians) into degrees before rounding it to the nearest 45 degrees and converting that back into radians
and
2: referring to a table of angular revolution (in radians(e.g, (2pi / 8 * 1), (2pi / 8 * 2), (2pi / 8 * 3), etc)), finding the one closest in proximity to the object's actual rotation(in radians) and changing the object's rotation to that.
I feel these methods are pretty trashy, and wanna find a more clean - cut one(like, just directly rounding the radians to the nearest 2pi / 8 without, say, any conversion or referral of a table). So pls help
thx a lot

3 comments
works great thx
guess i really didnt think this through
You're welcome :) I wouldn't know that, if I haven't had a similar problem in the past.