shortestModDist

@qbead/bloch-sphere


@qbead/bloch-sphere / shortestModDist

Function: shortestModDist()

shortestModDist(a0, a1, modulo): number

Defined in: src/math/geometry.ts:106arrow-up-right

Computes the shortest distance between two angles, considering wrap-around

Parameters

Parameter
Type
Description

a0

number

The first angle

a1

number

The second angle

modulo

number

The modulo value (e.g., 2π for radians)

Returns

number

The shortest distance from a0 to a1

Last updated