sharee.bike-App/TINKLib/Model/PositionFactory.cs

12 lines
292 B
C#
Raw Normal View History

2022-01-22 18:16:10 +01:00

namespace TINK.Model
{
2022-09-06 16:08:19 +02:00
public static class PositionFactory
{
public static IPosition Create(double latitude = double.NaN, double longitude = double.NaN)
=> Position.GetIsValid(longitude, latitude)
? new Position(latitude, longitude) as IPosition
2023-04-19 12:14:14 +02:00
: new NullPosition();
2022-09-06 16:08:19 +02:00
}
2022-01-22 18:16:10 +01:00
}