public void FloatToString_5Precision_IsRoundedTo5Places() { var testInput = 3.141593f; var expected = "3.14159"; var result = S2VXUtils.FloatToString(testInput, 5); Assert.AreEqual(expected, result); }
public void FloatToString_0Precision_IsExact() { var testInput = 3.141593f; var expected = "3.141593"; var result = S2VXUtils.FloatToString(testInput); Assert.AreEqual(expected, result); }
protected override string ToEndValue() => S2VXUtils.FloatToString(EndValue, 4);
protected override string ToStartValue() => S2VXUtils.FloatToString(StartValue, 4);
public override void UpdateDisplay() => UpdateDisplay( Editor.SnapDivisor == 0 ? "Snap Divisor: Free" : "Snap Divisor: " + S2VXUtils.FloatToString(1.0f / Editor.SnapDivisor));