Skip to content

Commit f904346

Browse files
njlrTheAngryByrd
authored andcommitted
* Swaps valid ranges for lat and long
1 parent 1b39b73 commit f904346

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitbook/result/map2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type Latitude = private Latitude of float with
5757
member this.Value = let (Latitude lat) = this in lat
5858
// float -> Result<Latitude, string>
5959
static member TryCreate (lat : float) =
60-
if lat > -180. && lat <= 180. then
60+
if lat > -90. && lat <= 90. then
6161
Ok (Latitude lat)
6262
else
6363
sprintf "%A is a invalid latitude value" lat |> Error
@@ -71,7 +71,7 @@ type Longitude = private Longitude of float with
7171
member this.Value = let (Longitude lng) = this in lng
7272
// float -> Result<Longitude, string>
7373
static member TryCreate (lng : float) =
74-
if lng >= -90. && lng <= 90. then
74+
if lng >= -180. && lng <= 180. then
7575
Ok (Longitude lng)
7676
else
7777
sprintf "%A is a invalid longitude value" lng |> Error

0 commit comments

Comments
 (0)