godotengine / godotengine/godot-cpp

Vector operators give the wrong result when compiling with "precision=double"

Open
#1,019 2 comments 0 reactions 0 assignees View on GitHub
bug topic:gdextension
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

Steps to reproduce:
I used the example project provided and added a couple lines of code:
`UtilityFunctions::print(Vector3(1.0, 0.0, 0.0));`
`UtilityFunctions::print(Vector3(1.0, 0.0, 0.0)*2.0);`
Then compiled with platform=windows target=template_debug arch=x64 on 151ea35c5fbb0254e0d3d29e230270b60852915f for beta 12

This gives the expected output:
(1, 0, 0)
(2, 0, 0)

However, when you add "precision=double," things get weird. The output instead reads:
(0, 1.875, 0)
(0, 2, 0)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.