More reliable float->fraction conversion, fixed manual fps input

This commit is contained in:
N00MKRAD
2021-04-04 21:54:26 +02:00
parent deb88d43c2
commit f51c10bef0
4 changed files with 9 additions and 56 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Windows.Navigation;
namespace Flowframes.Data
{
@@ -42,9 +43,9 @@ namespace Flowframes.Data
public Fraction(float value)
{
int[] frac = value.ToFraction();
Numerator = frac[0];
Denominator = frac[1];
Numerator = (value * 10000f).RoundToInt();
Denominator = 10000;
this = GetReduced();
}
public Fraction(string text)