Hi,
I ran into a strange problem with calculations:
Why does this GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Cyan, FString::SanitizeFloat(1 - (0.1f * 3))); not equal to this GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Cyan, FString::SanitizeFloat(1 - ((1 / 10) * 3)));
From what I can calculate they should both yield the same answer. However the former give 0.7 as an answer while the latter give 1.
To attempt to clarify, integers are not very friendly with decimal values or anything related to fractions. It drops anything on the right side of the decimal.