Page MenuHomeFeedback Tracker

float returning wrong result
Assigned, NormalPublic

Description

Today i run into an issue and neither Mario nor Arkensor had a clear solution for it.

// Example 1 (calculate result is wrong) 
float currentMidBrightness = world.GetCameraSceneMiddleBrightness(mainCameraIndex);
int multiply = 125;
float result = currentMidBrightness * multiply; 
Print(result); // will return something between 0.9 and 1.2 but correct should be 6 - 6.2

// Example 2 (calculate result is wrong) 
float currentMidBrightness = world.GetCameraSceneMiddleBrightness(mainCameraIndex);
float multiply = 125.0;
float result = currentMidBrightness * multiply; 
Print(result);  // will return something between 0.9 and 1.2 but correct should be 6 - 6.2

// Example 3
float currentMidBrightness = world.GetCameraSceneMiddleBrightness(mainCameraIndex);
float result = currentMidBrightness * 125.0;  
Print(result);  // Result is correct, but if you use the result variable later it gets wrong again

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

R34P3R created this task.Aug 31 2024, 9:48 PM
R34P3R updated the task description. (Show Details)
R34P3R updated the task description. (Show Details)Sep 1 2024, 12:35 AM
Geez changed the task status from New to Assigned.Sep 10 2024, 3:45 PM