Skip to content

deen24id/odd-even

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Languages