Skip to content

Commit

Permalink
Remove reference to NaN heading value (#35469)
Browse files Browse the repository at this point in the history
* Remove reference to NaN heading value

Matches specification change in w3c/geolocation#173 and discussion about existing implementations in w3c/geolocation#171.

* Update heading/index.md as well
  • Loading branch information
reillyeon authored Aug 24, 2024
1 parent ccaef74 commit 68c5b12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ browser-compat: api.GeolocationCoordinates.heading

{{securecontext_header}}{{APIRef("Geolocation API")}}

The **`heading`** read-only property of the {{domxref("GeolocationCoordinates")}} interface is a `double` representing the direction in which the device is traveling. This value, specified in degrees, indicates how far off from heading due north the device is. `0` degrees represents true north, and the direction is determined clockwise (which means that east is `90` degrees and west is `270` degrees). If {{domxref("GeolocationCoordinates.speed")}} is `0`, `heading` is {{jsxref("NaN")}}. If the device is not able to provide heading information, this value is `null`.
The **`heading`** read-only property of the {{domxref("GeolocationCoordinates")}} interface is a `double` representing the direction in which the device is traveling. This value, specified in degrees, indicates how far off from heading due north the device is. `0` degrees represents true north, and the direction is determined clockwise (which means that east is `90` degrees and west is `270` degrees). If {{domxref("GeolocationCoordinates.speed")}} is `0` or the device is not able to provide heading information, `heading` is `null`.

## Value

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/geolocationcoordinates/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ _The `GeolocationCoordinates` interface doesn't inherit any properties._
- {{domxref("GeolocationCoordinates.altitudeAccuracy")}} {{ReadOnlyInline}}
- : Returns a `double` representing the accuracy of the `altitude` expressed in meters. This value can be `null` if the implementation cannot provide the data.
- {{domxref("GeolocationCoordinates.heading")}} {{ReadOnlyInline}}
- : Returns a `double` representing the direction towards which the device is facing. This value, specified in degrees, indicates how far off from heading true north the device is. `0` degrees represents true north, and the direction is determined clockwise (which means that east is `90` degrees and west is `270` degrees). If `speed` is `0`, `heading` is {{jsxref("NaN")}}. If the device is unable to provide `heading` information, this value is `null`.
- : Returns a `double` representing the direction towards which the device is facing. This value, specified in degrees, indicates how far off from heading true north the device is. `0` degrees represents true north, and the direction is determined clockwise (which means that east is `90` degrees and west is `270` degrees). If `speed` is `0` or the device is unable to provide `heading` information, `heading` is `null`.
- {{domxref("GeolocationCoordinates.speed")}} {{ReadOnlyInline}}
- : Returns a `double` representing the velocity of the device in meters per second. This value can be `null`.

Expand Down

0 comments on commit 68c5b12

Please sign in to comment.