std
    Preparing search index...

    Variable gcdConst

    gcd: (a: number, b: number) => number = gcf

    Solves the GCD (Greatest Common Divisor) using the Euclidean Algorithm (Alternate alias of gcf)

    Type declaration

      • (a: number, b: number): number
      • Solves the GCF (Greatest Common Factor) using the Euclidean Algorithm

        Parameters

        • a: number
        • b: number

        Returns number

        gcf(1920, 1080); // 120
        gcf(2, 2); // 2
    gcd(1920, 1080); // 120
    gcd(2, 2); // 2