I am working in the material editor and using Unreal Engine 5.3. there are 2 constant nodes for a single value.
the simple constant node that we used to have in the previous version.
and new node Constant Double which I suppose should have a higher precision value than a single floating point.
but both have the same single floating point precision so I don’t understand the point of two different nodes.
Note: I already know we have a function for radian to a degree so the example is only for test.
here is an example.
Constant Double (full_Rotation_Radian) = 6.28318530717958647692
Constant Double (half_Rotation_Degree) = 180
Constant Double (Pi) = 3.14159265358979323846
The answer in the material editor is incorrect:
(half_Rotation_Degree / Pi) * full_Rotation_Radian = 369.0002200 (incorrect value)
Correct Value using a calculator:
(half_Rotation_Degree / Pi) * full_Rotation_Radian = 360 (correct value)
If i break down the calculations.
In material editor: 180 / pi = 57.295815 (incorrect value)
From calculator rounded value : 180 / pi = 57.29578 (correct value)
It’s messing up values before even rounded digit.