mirror of
https://github.com/acamarata/qibla-dart.git
synced 2026-07-01 03:14:29 +00:00
832 B
832 B
qibla
Qibla direction, great-circle path, and haversine distance for Dart and Flutter. Computes the bearing to the Ka'bah from any point on Earth. Pure math, zero dependencies.
Install
dependencies:
qibla: ^1.0.1
import 'package:qibla/qibla.dart';
final bearing = qiblaAngle(40.7128, -74.006);
print(bearing); // ~58.48
print(compassDir(bearing)); // NE
final km = distanceKm(40.7128, -74.006, kaabaLat, kaabaLng);
print(km); // ~9634
Contents
- Quickstart Guide — install, first call, compass directions
- Advanced Usage — great-circle paths, custom interpolation
- API Reference — full function and constant reference
- Examples — real-world snippets
- Contributing