the sign is not really important its 2 * pi / 65535 = 0.00009587526218325454 rad increments
here is a small benchmark
-- server
local packet = Packet("Name", Packet.NumberF64, Packet.CFrameF32U16, Packet.CFrameF32F16)
task.wait(1)
for index = 20000, 22000 do
local angle = index / 10000
local cframe = CFrame.fromAxisAngle(Vector3.yAxis, angle)
packet:Fire(angle, cframe, cframe)
end
-- client
local packet = Packet("Name", Packet.NumberF64, Packet.CFrameF32U16, Packet.CFrameF32F16)
local u16Wins = 0
local f16Wins = 0
packet.OnClientEvent:Connect(function(number, U16, F16)
warn(number)
local axis, angle1 = U16:ToAxisAngle()
local delta1 = math.abs(number - angle1)
print("U16", angle1)
local axis, angle2 = F16:ToAxisAngle()
local delta2 = math.abs(number - angle2)
print("F16", angle2)
if delta1 < delta2 then warn("Winner: U16") u16Wins += 1 else warn("Winner: F16") f16Wins += 1 end
print("")
end)
task.wait(3)
warn("U16", u16Wins)
warn("F16", f16Wins)
and here are the results
notice how F16 printed 2.1992104053497314
5 times in a row
this is because n / 10000
goes past a F16s precision but not a U16s precision
U16 would not repeat up to n / 10430.219195527361
so hopefully this shows that U16 is a lot more accurate then F16 (about 5x more accurate)
and this is what the 2 types look like
so in short U16 has about 5x more precision then F16
F16 has 0.00048828125
radian increments in this benchmark
U16 has 0.00009587526218325454
radian increments
but also take note that the increments for F16 are not fixed as the number gets higher the precision will get worse
also as a bonus writing/reading a U16 will also use less CPU then a F16