0.1.33 • Published 9 months ago

compass-heading-js v0.1.33

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

compass-heading-js

npm version License

Overview

Converts device orientation to compass heading.

Installation

You can install this library using npm:

npm install compass-heading-js

Props

keydescriptiion
alphaThe device's compass heading
betathe device's tilt front-to-back
gammathe device's tilt left-to-right

Usage

import { calculateCompassHeading } from "compass-heading-js";

const alpha = 45;
const beta = 30;
const gamma = 60;

const heading = calculateCompassHeading(alpha, beta, gamma);
console.log(heading);
// Output: 260.76847951640775

License

This project is licensed under the MIT License - see the LICENSE file for details.

0.1.32

9 months ago

0.1.33

9 months ago

0.1.30

10 months ago

0.1.31

10 months ago

0.1.27

11 months ago

0.1.28

11 months ago

0.1.29

11 months ago

0.1.21

1 year ago

0.1.22

1 year ago

0.1.23

1 year ago

0.1.24

1 year ago

0.1.25

1 year ago

0.1.26

11 months ago

0.1.20

1 year ago

0.1.17

1 year ago

0.1.18

1 year ago

0.1.19

1 year ago

0.1.14

1 year ago

0.1.15

1 year ago

0.1.16

1 year ago

0.1.11

1 year ago

0.1.12

1 year ago

0.1.13

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.4

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.3

2 years ago

0.1.0

2 years ago