コード例 #1
0
        public void Vector2ToString_0Precision_IsExact()
        {
            var testInput = new Vector2(1.234567f, -7.890123f);
            var expected  = "(1.234567,-7.890123)";
            var result    = S2VXUtils.Vector2ToString(testInput);

            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public void Vector2ToString_5Precision_IsRoundedTo5Places()
        {
            var testInput = new Vector2(1.234567f, -7.890123f);
            var expected  = "(1.23457,-7.89012)";
            var result    = S2VXUtils.Vector2ToString(testInput, 5);

            Assert.AreEqual(expected, result);
        }
コード例 #3
0
 protected override string ToEndValue() => S2VXUtils.Vector2ToString(EndValue, 4);
コード例 #4
0
 public override void UpdateDisplay() => UpdateDisplay(S2VXUtils.Vector2ToString(Editor.MousePosition, 2));