iceshrimp/packages/backend/src/prelude/math.ts
syuilo 14148f6c4a refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00

4 lines
91 B
TypeScript

export function gcd(a: number, b: number): number {
return b === 0 ? a : gcd(b, a % b);
}