Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m_velocityPan initial value. #2345

Open
hoss291069 opened this issue Dec 28, 2023 · 1 comment
Open

m_velocityPan initial value. #2345

hoss291069 opened this issue Dec 28, 2023 · 1 comment

Comments

@hoss291069
Copy link

Hi
In util/inputHandler.h file member object m_velocityPan does not initialize.
In Linux OS usually uninitialized variables take zero value but in windows it's value is unknown.
if this variable has a big number at startup, it cause fast moving to unknown position. That's why I think it's better initialize in header to zero.
glm::vec2 m_velocityPan={0,0};

@matteblair
Copy link
Member

Hi, thanks for checking out the code!

I believe this variable is already being initialized to zero by its default constructor. The glm::vec types have optional default constructors that we enable with the GLM_FORCE_CTOR_INIT define in our build script.

Have you observed this variable being initialized with a non-zero value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants