WaffleDevs
❔ Need Help Understanding Casting
(float)that = Math.fround(that) = 0.448212206363678
for both languages.
C#: (double)(Mathf.SmoothStep(0.008f, 0.05f, ((float)num - 2400f) / 1000f) * (float)that);
0.003585697850212455
JS: (CSharpMath.SmoothStep(0.008, 0.05, (num - 2400) / 1000) * Math.fround(that));
0.003585697650909424
JS: Math.fround(CSharpMath.SmoothStep(0.008, 0.05, (num - 2400) / 1000) * Math.fround(that));
0.003585697617381811
96 replies