(firstNumber, secondNumber)
| 19 | * @returns return correspond boolean value, if both number are co-prime return `true`, else return `false`. |
| 20 | */ |
| 21 | const CoPrimeCheck = (firstNumber, secondNumber) => { |
| 22 | /* |
| 23 | This is the most efficient algorithm for checking co-primes |
| 24 | if the GCD of both the numbers is 1 that means they are co-primes. |
| 25 | */ |
| 26 | return GetEuclidGCD(firstNumber, secondNumber) === 1 |
| 27 | } |
| 28 | |
| 29 | export { CoPrimeCheck } |
no test coverage detected