feat: release v0.0.1
This commit is contained in:
18
dist/react/video-player/shared/math.js
vendored
Normal file
18
dist/react/video-player/shared/math.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
export const gcd = (a, b) => {
|
||||
return b === 0 ? a : gcd(b, a % b);
|
||||
};
|
||||
export const numWord = (value, words) => {
|
||||
const normalized = Math.abs(value) % 100;
|
||||
const remainder = normalized % 10;
|
||||
if (normalized > 10 && normalized < 20) {
|
||||
return words[2];
|
||||
}
|
||||
if (remainder > 1 && remainder < 5) {
|
||||
return words[1];
|
||||
}
|
||||
if (remainder === 1) {
|
||||
return words[0];
|
||||
}
|
||||
return words[2];
|
||||
};
|
||||
//# sourceMappingURL=math.js.map
|
||||
Reference in New Issue
Block a user