Simplify
This commit is contained in:
parent
ce5b17ee8b
commit
a0059309b6
4 changed files with 10 additions and 4 deletions
|
|
@ -817,6 +817,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
valueAsVector2.X = Helpers.ParseDouble(twoValues[0]);
|
||||
valueAsVector2.Y = Helpers.ParseDouble(twoValues[1]);
|
||||
}
|
||||
|
||||
return (T)(object)(valueAsVector2);
|
||||
}
|
||||
else if(typeof(T) == typeof(Vector3))
|
||||
|
|
|
|||
|
|
@ -83,10 +83,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
internal double ParseDouble(string firstLayerValueString)
|
||||
{
|
||||
double firstLayerValue;
|
||||
|
||||
if (!double.TryParse(firstLayerValueString, out firstLayerValue))
|
||||
{
|
||||
throw new Exception(string.Format("Format cannot be parsed. FirstLayerHeight '{0}'", firstLayerValueString));
|
||||
}
|
||||
|
||||
return firstLayerValue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue