mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-30 10:03:03 +00:00
parent
e8948452fd
commit
1cc183ecdb
3 changed files with 4 additions and 3 deletions
|
@ -1,2 +0,0 @@
|
||||||
const gcd = (a, b) => !b ? a : gcd(b, a % b);
|
|
||||||
export default gcd;
|
|
|
@ -67,7 +67,7 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as EXIF from 'exif-js';
|
import * as EXIF from 'exif-js';
|
||||||
import * as hljs from 'highlight.js';
|
import * as hljs from 'highlight.js';
|
||||||
import gcd from '../../../common/scripts/gcd';
|
import { gcd } from '../../../../../prelude/math';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['file'],
|
props: ['file'],
|
||||||
|
|
3
src/prelude/math.ts
Normal file
3
src/prelude/math.ts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export function gcd(a: number, b: number): number {
|
||||||
|
return b === 0 ? a : gcd(b, a % b);
|
||||||
|
}
|
Loading…
Reference in a new issue