1
0

sec fixes

This commit is contained in:
Debug_pro
2026-02-12 01:35:34 +03:00
parent 72d7aa9575
commit a78cd09def
2 changed files with 43 additions and 5 deletions

View File

@@ -16,8 +16,15 @@ namespace Lab
get { return first + second; }
set
{
first = Math.Truncate(value);
second = Math.Abs(value - first);
if (double.IsNaN(value) || double.IsInfinity(value))
{
first = 0;
second = 0;
return;
}
first = Math.Floor(value);
second = value - first;
second = Math.Round(second, 10);
@@ -31,7 +38,14 @@ namespace Lab
public void Multiply(double m)
{
Value = Value * m;
double res = Value * m;
if (double.IsNaN(res) || double.IsInfinity(res))
{
first = 0;
second = 0;
return;
}
Value = res;
}
}
}