From ffb4da791d9b52f6bf60da3856535f224a6a8f5a Mon Sep 17 00:00:00 2001 From: archanpatkar Date: Wed, 3 Jul 2019 22:21:03 +0530 Subject: [PATCH] math: converted gcd and lcm to support i64 --- vlib/math/math.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/math/math.v b/vlib/math/math.v index 51c6676c70..5d45576073 100644 --- a/vlib/math/math.v +++ b/vlib/math/math.v @@ -106,7 +106,7 @@ pub fn fmod(a, b f64) f64 { } // gcd calculates greatest common (positive) divisor (or zero if a and b are both zero). -pub fn gcd(a, b int) int { +pub fn gcd(a, b i64) i64 { if a < 0 { a = -a } @@ -124,7 +124,7 @@ pub fn gcd(a, b int) int { } // lcm calculates least common (non-negative) multiple. -pub fn lcm(a, b int) int { +pub fn lcm(a, b i64) i64 { if a == 0 { return a }