Main
Vectors
Matrix
Matrix Manipulation
Transformation Matrices
Angles
Random
Bezier Curve
Equations
Path Movement
Color
Linear Interpolation
Derivatives
Collision Detection
Animation
Circle And Ellipse
Sequence
Combinatorics
Other

Is angle between two other angles?

This function checks if the given angle is between two other angles (inclusive). Angles are in degrees.

import { isAngleBetween } from 'mz-math';

const isBetween1 = isAngleBetween(45, 0, 90); // true
const isBetween2 = isAngleBetween(180, 0, 90); // false