SanderMertens / flecs

A fast entity component system (ECS) for C & C++

Home Page:https://www.flecs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to support fixed-point number?

yafacex opened this issue · comments

how to support fixed-point number gracely?I want to ensure calculate consistency in different devices.
especially when i use flecs-cs, one decimal both stores in c and c#.

You can override the type flecs uses for tracking time with an integer type (defined here https://github.com/SanderMertens/flecs/blob/master/include/flecs.h#L42), for example:

#define ecs_ftime_t uint64_t

You can override the type flecs uses for tracking time with an integer type (defined here https://github.com/SanderMertens/flecs/blob/master/include/flecs.h#L42), for example:

#define ecs_ftime_t uint64_t

thanks