UNPKG

stitch-compute

Version:

compute stitch adjustments for knitting

30 lines (29 loc) 1.1 kB
"use strict"; /* * Copyright (C) 2021 Christian Garbs <mitch@cgarbs.de> * Licensed under GNU GPL v3 or later. * * This file is part of stitch-compute. * * stitch-compute is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * stitch-compute is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with stitch-compute. If not, see <http://www.gnu.org/licenses/>. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.greatestCommonDivisor = void 0; function greatestCommonDivisor(a, b) { if (a === 0) { return b; } return greatestCommonDivisor(b % a, a); } exports.greatestCommonDivisor = greatestCommonDivisor;