From 0f6c020c2696afa3dc3fbbb7b7702594ea6ba9db Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Mon, 19 Aug 2024 08:17:36 +0100 Subject: [PATCH] [*] Scar is being a deadbeat. Blame him if this doesn't build. Unverified C2397 narrowing conversion. --- Source/RNG/AuRandomDevice.cpp | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Source/RNG/AuRandomDevice.cpp b/Source/RNG/AuRandomDevice.cpp index f8ad0084..14004b25 100644 --- a/Source/RNG/AuRandomDevice.cpp +++ b/Source/RNG/AuRandomDevice.cpp @@ -343,8 +343,8 @@ namespace Aurora::RNG auto dComponentB = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); return AuVec2 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]) }; } @@ -373,9 +373,9 @@ namespace Aurora::RNG auto dComponentC = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); return AuVec3 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1], - (dComponentC * range[2]) + min[2] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]), + float((dComponentC * range[2]) + min[2]) }; } @@ -408,10 +408,10 @@ namespace Aurora::RNG auto dComponentD = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); return AuVec4 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1], - (dComponentC * range[2]) + min[2], - (dComponentD * range[3]) + min[3] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]), + float((dComponentC * range[2]) + min[2]), + float((dComponentD * range[3]) + min[3]) }; } @@ -849,8 +849,8 @@ namespace Aurora::RNG auto dComponentB = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); ret[uIndex] = AuVec2 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]) }; } @@ -875,8 +875,8 @@ namespace Aurora::RNG auto dComponentB = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); ret[uIndex] = AuVec2 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]) }; } @@ -930,9 +930,9 @@ namespace Aurora::RNG auto dComponentC = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); ret[uIndex] = AuVec3 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1], - (dComponentC * range[2]) + min[2] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]), + float((dComponentC * range[2]) + min[2]) }; } @@ -958,9 +958,9 @@ namespace Aurora::RNG auto dComponentC = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); ret[uIndex] = AuVec3 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1], - (dComponentC * range[2]) + min[2] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]), + float((dComponentC * range[2]) + min[2]) }; } @@ -1020,10 +1020,10 @@ namespace Aurora::RNG auto dComponentD = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); ret[uIndex] = AuVec4 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1], - (dComponentC * range[2]) + min[2], - (dComponentD * range[3]) + min[3] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]), + float((dComponentC * range[2]) + min[2]), + float((dComponentD * range[3]) + min[3]) }; } @@ -1051,10 +1051,10 @@ namespace Aurora::RNG auto dComponentD = RngConvertToDecimal(uSeed = (AuFnv1a64Runtime<8>(&uSeed))); ret[uIndex] = AuVec4 { - (dComponentA * range[0]) + min[0], - (dComponentB * range[1]) + min[1], - (dComponentC * range[2]) + min[2], - (dComponentD * range[3]) + min[3] + float((dComponentA * range[0]) + min[0]), + float((dComponentB * range[1]) + min[1]), + float((dComponentC * range[2]) + min[2]), + float((dComponentD * range[3]) + min[3]) }; }