You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using 32bit size signed is limited to [−2,147,483,647, +2,147,483,647] range.
It's not possible to have larger value than that in the current Nuklear.
Adding support for unsigned long long which is 64bit size will have [0, +18,446,744,073,709,551,615] range and open up more possibility for apps using Nuklear.
The function could be called nk_property_ull(struct nk_context *ctx, const char *name, unsigned long long min, unsigned long long *val, unsigned long long max, unsigned long long step, float inc_per_pixel).
union nk_property {
int i;
float f;
double d;
+ unsigned long long ull;
};
We have to think about not overflowing signed or wrap around unsigned values. INT30-CINT32-C.
The text was updated successfully, but these errors were encountered:
KenthJohan
changed the title
Can we add nk_property_ull for 64 bit unsigned integers?
Adding possability to use 64bit unsigned long long in nk_property_ull gui element
Mar 16, 2020
Generally I'm not against 64 (or more) bit widths nor against adding new property functions to Nuklear. I'm though quite concerned about unsigned as all other functions were deliberately signed. Would it work for your use case to use signed 64 bit integers?
There should be also a "friend" function analogous to nk_propertyi().
Using 32bit size signed is limited to
[−2,147,483,647, +2,147,483,647]
range.It's not possible to have larger value than that in the current Nuklear.
Adding support for unsigned long long which is 64bit size will have
[0, +18,446,744,073,709,551,615]
range and open up more possibility for apps using Nuklear.The function could be called
nk_property_ull(struct nk_context *ctx, const char *name, unsigned long long min, unsigned long long *val, unsigned long long max, unsigned long long step, float inc_per_pixel)
.Adding this function would require:
enum nk_property_kind { NK_PROPERTY_INT, NK_PROPERTY_FLOAT, NK_PROPERTY_DOUBLE, + NK_PROPERTY_ULL };
union nk_property { int i; float f; double d; + unsigned long long ull; };
We have to think about not overflowing signed or wrap around unsigned values. INT30-C INT32-C.
The text was updated successfully, but these errors were encountered: