示例#1
0
        public void FloatToString_5Precision_IsRoundedTo5Places()
        {
            var testInput = 3.141593f;
            var expected  = "3.14159";
            var result    = S2VXUtils.FloatToString(testInput, 5);

            Assert.AreEqual(expected, result);
        }
示例#2
0
        public void FloatToString_0Precision_IsExact()
        {
            var testInput = 3.141593f;
            var expected  = "3.141593";
            var result    = S2VXUtils.FloatToString(testInput);

            Assert.AreEqual(expected, result);
        }
示例#3
0
 protected override string ToEndValue() => S2VXUtils.FloatToString(EndValue, 4);
示例#4
0
 protected override string ToStartValue() => S2VXUtils.FloatToString(StartValue, 4);
示例#5
0
 public override void UpdateDisplay() => UpdateDisplay(
     Editor.SnapDivisor == 0 ? "Snap Divisor: Free" : "Snap Divisor: " + S2VXUtils.FloatToString(1.0f / Editor.SnapDivisor));