diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2025-01-05 16:54:36 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2025-01-05 16:54:36 +0100 |
commit | 35b0f811f23f029110373798b19d9d0895d907f0 (patch) | |
tree | 2e4906a992c2569fa0f89dbe0f079010a734cc41 /extractor/version.gd | |
parent | e08a29e73ea4f7e6d78e8e7f5a6e7033dbc1f542 (diff) |
next commit
Diffstat (limited to 'extractor/version.gd')
-rw-r--r-- | extractor/version.gd | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/extractor/version.gd b/extractor/version.gd index 679a8f0..ae97a10 100644 --- a/extractor/version.gd +++ b/extractor/version.gd @@ -11,5 +11,25 @@ var major: int var minor: int +func lower_than(compare_major: int, compare_minor: int) -> bool: + if (major > compare_major): + return false + + if (major == compare_major): + return minor < compare_minor + + return true + + +func higher_than(compare_major: int, compare_minor: int) -> bool: + if (major > compare_major): + return true + + if (major == compare_major): + return minor > compare_minor + + return false + + func _to_string() -> String: return "%s.%s" % [major, minor] |