public void TestSetAllAlphas() { VertexData vertexData = new VertexData(4); vertexData.SetAlpha(0.5f); for (int i = 0; i < vertexData.NumVertices; ++i) { AssertAreEqualWithSmallError(0.5f, vertexData.AlphaAt(i), "wrong alpha", 0.005f); } }
public void TestSetAllColorsAndAlphas() { uint color = 0xabcdef; float alpha = 0.5f; VertexData vertexData = new VertexData(4); vertexData.SetColor(color); vertexData.SetAlpha(alpha); for (int i=0; i<vertexData.NumVertices; ++i) { Assert.AreEqual(color, vertexData.ColorAt(i), "wrong color"); AssertAreEqualWithSmallError(alpha, vertexData.AlphaAt(i), "wrong alpha", 0.005f); } }