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

Get Circle & Ellipse Circumference

The isAngleInCircleArc() function checks whether a given angle falls within a circular arc defined by a start angle and an end angle. It considers the possibility of the arc crossing the 360-degree mark and handles it accordingly.

import { isAngleInCircleArc } from 'mz-math';

const startAngleDeg = 0;
const endAngleDeg = 90; 
const currentDegrees = 45;

const isInAcr = isAngleInCircleArc(startAngleDeg, endAngleDeg, currentDegrees); // true
import { isAngleInCircleArc } from 'mz-math';

const startAngleDeg = 0;
const endAngleDeg = 90; 
const currentDegrees = 180;

const isInAcr = isAngleInCircleArc(startAngleDeg, endAngleDeg, currentDegrees); // false