Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

compass-heading-js

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

compass-heading-js

Converts device orientation to compass heading.

latest
Source
npmnpm
Version
0.1.33
Version published
Maintainers
1
Created
Source

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.

Keywords

compass

FAQs

Package last updated on 01 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts