mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 17:08:00 +02:00
Use RemoveFromStart
in Float.Parse
This commit is contained in:
parent
3ff67cfd7b
commit
d0673115d0
1 changed files with 7 additions and 4 deletions
|
@ -180,15 +180,18 @@ namespace System
|
||||||
double result = 0;
|
double result = 0;
|
||||||
double decimalMultiplier = 0;
|
double decimalMultiplier = 0;
|
||||||
|
|
||||||
if (val.Equals(info.NegativeInfinitySymbol, true))
|
var val;
|
||||||
|
val.RemoveFromStart(offset);
|
||||||
|
|
||||||
|
if (@val.Equals(info.NegativeInfinitySymbol, true))
|
||||||
return NegativeInfinity;
|
return NegativeInfinity;
|
||||||
else if (val.Substring(offset).Equals(info.PositiveInfinitySymbol, true))
|
else if (val.Equals(info.PositiveInfinitySymbol, true))
|
||||||
return PositiveInfinity;
|
return PositiveInfinity;
|
||||||
else if (val.Substring(offset).Equals(info.NaNSymbol, true))
|
else if (val.Equals(info.NaNSymbol, true))
|
||||||
return NaN;
|
return NaN;
|
||||||
|
|
||||||
//TODO: Use Number.ParseNumber
|
//TODO: Use Number.ParseNumber
|
||||||
for (int32 i = offset; i < val.Length - offset; i++)
|
for (int32 i = 0; i < val.Length; i++)
|
||||||
{
|
{
|
||||||
char8 c = val.Ptr[i];
|
char8 c = val.Ptr[i];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue