qibla/.github/wiki/api/functions/qiblaGreatCircle.md
Aric Camarata a59756bd07 docs: add TypeDoc API generation (typedoc@0.28.19 + typedoc-plugin-markdown@4.11.0)
Add typedoc and typedoc-plugin-markdown as devDependencies. Add typedoc.json config
targeting src/index.ts with markdown output to .github/wiki/api. Add docs script to
package.json. Generate initial API reference pages.

Part of T-E8-03 — TypeDoc automation for all 12 JS/TS packages.
2026-05-30 16:41:58 -04:00

880 B

@acamarata/qibla v1.1.1


@acamarata/qibla / qiblaGreatCircle

Function: qiblaGreatCircle()

qiblaGreatCircle(lat, lng, steps?): [number, number][]

Defined in: index.ts:98

Great-circle waypoints from [lat, lng] to the Ka'bah.

Uses the Slerp (spherical linear interpolation) formula. Useful for drawing Qibla direction lines on maps.

Parameters

lat

number

Origin latitude in decimal degrees.

lng

number

Origin longitude in decimal degrees.

steps?

number = 120

Number of segments (default: 120, producing 121 points).

Returns

[number, number][]

Array of [latitude, longitude] pairs in degrees.

Throws

If latitude is outside [-90, 90] or longitude outside [-180, 180].