Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 750 Bytes

README.md

File metadata and controls

38 lines (25 loc) · 750 Bytes

deen24id/odd_even

A Lune (Luau runtime) module to test whether a number is odd or even.

Installation

Install via pesde

pesde add deen24id/odd_even

Usage

Import odd_even package:

local odd_even = require("lune_packages/odd_even")

Use isOdd function to check whether a number is odd:

print(odd_even.isOdd(1)) --true

Use isEven function to check whether a number is even:

print(odd_even.isEven(2)) --true

Since luau only supports number but not integer, any other numbers like decimals will return false for both functions:

print(odd_even.isOdd(0.1)) --false
print(odd_even.isEven(0.1)) --false