ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:gcf

Table of Contents

gcf

Description

Returns the greatest common factor of two numbers.

The result will be negative if one or both arguments are negative.

Examples

gcf(18,   24) -> 6
gcf(-18,  24) -> -6
gcf(18,  -24) -> -6
gcf(-18, -24) -> -6

gcf(18.0,   24.0) -> 6.0
gcf(-18.0,  24.0) -> -6.0
gcf(18.0,  -24.0) -> -6.0
gcf(-18.0, -24.0) -> -6.0
functions/gcf.txt · Last modified: 2017/03/15 10:58 by korshun