float16 in StreamPeer #5983
Closed
theraot
started this conversation in
Engine Core
Replies: 2 comments
-
I'd suggest |
Beta Was this translation helpful? Give feedback.
0 replies
-
Naming aside the feature is already in the engine. I'm closing this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently in StreamPeer I can put and get float and double, and I can put and get int16, but no half precision floating point (float16).
I want to build-in methods to put and get float16 for network traffic and serialization optimization.
Converting GDScript
float
to float16 stored in anint
to use withget_int16
andput_int16
would be error prone and less efficient.Furthermore, I think the float and double methods could use a rename. So:
float get_float16()
,void put_float16(float value)
(currently not existent)float get_float32()
,void put_float32(float value)
(currentlyfloat get_float()
,void put_float(float value)
)float get_float64()
,void put_float64(float value)
(currentlyfloat get_double()
,void put_double(float value)
)Notice the mix of language here: the API currently uses the words
double
andfloat
instead ofdouble
andsingle
. Meanwhile the methods working withint
say the size in bits.Beta Was this translation helpful? Give feedback.
All reactions