public void ReadOnlySpanToVector2Fix16Test() { var span = new Fix16[] { (Fix16)4, (Fix16)7 }.ToImmutableArray().AsSpan(); var vec = span.ToVector2Fix16(); Assert.That(vec.X, Is.EqualTo(span[0])); Assert.That(vec.Y, Is.EqualTo(span[1])); }
public void ArrayToVector2Fix16Test() { var array = new Fix16[] { (Fix16)4, (Fix16)7 }; var vec = array.ToVector2Fix16(); Assert.That(vec.X, Is.EqualTo(array[0])); Assert.That(vec.Y, Is.EqualTo(array[1])); }
public void SpanToVector2Fix16Test() { var span = new Fix16[] { (Fix16)4, (Fix16)7 }.AsSpan(); var vec = span.ToVector2Fix16(); Assert.That(vec.X, Is.EqualTo(span[0])); Assert.That(vec.Y, Is.EqualTo(span[1])); }