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