public void MultiplyScalar() { initializeArrays(); const float scalar = 5f; Vector3Fallbacks.MultiplyScalar(vec1, inputF, result); for (int i = 0; i < arrLength; i++) { Assert.True(result[i].ApproximatelyEquals(vec1[i] * inputF[i])); } }
public void MultiplyScalars() { Assert.True(Avx.IsSupported); initializeArrays(); Vector3Fallbacks.MultiplyScalar(vec1, inputF, result); Vector3Avx.MultiplyScalars(vec1, inputF, actual); for (int i = 0; i < arrLength; i++) { Assert.True(result[i].ApproximatelyEquals(actual[i]), $"index: {i}, result: {result[i]}, actual: {actual[i]}"); } }