Skip to content

Latest commit

 

History

History
59 lines (30 loc) · 1.24 KB

UtilityMath.md

File metadata and controls

59 lines (30 loc) · 1.24 KB

Disclaimer: this Documentation was written by ChatGPT

UtilityMath Class

Namespace: UtilityLib.UMath

Provides utility methods for mathematical operations.

IsOdd Method

Checks if an integer is odd.

Parameters

  • input (int): The integer to check.

Returns

  • bool: true if the input is odd; otherwise, false.

IsEven Method

Checks if an integer is even.

Parameters

  • input (int): The integer to check.

Returns

  • bool: true if the input is even; otherwise, false.

IsPrime Method

Checks if an integer is a prime number.

Parameters

  • input (int): The integer to check.

Returns

  • bool: true if the input is a prime number; otherwise, false.

IsFibonacci Method

Checks if an integer is a Fibonacci number.

Parameters

  • input (int): The integer to check.

Returns

  • bool: true if the input is a fibonacci number; otherwise, false.

Conclusion

The UtilityMath class provides utility methods for common mathematical operations. Developers can use these methods to check if an integer is odd, even, or a prime number. These functions are designed to assist in mathematical computations and can be used to implement logic based on the properties of numbers.