# Module: mathOperations

Contains all of the business rule functions for doing math operations and conversions.

Author:
  - Seth Hollingsead
Copyright:
  - Copyright © 2022-… by Seth Hollingsead. All rights reserved
Source:
  - businessRules/rules/mathOperations.js, line 1

### Requires

- module:ruleParsing
- module:loggers
- @haystacks/constants
- path

### Methods

#### (inner) hex2rgbConversion(inputData, inputMetaData) → {array.<integer, integer, integer>}

Converts a hexadecimal color value to an RGB color value.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The hexadecimal value that should be converted to an RGB value.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/mathOperations.js, line 26

##### Returns:

The RGB value.

Type
  array.<integer, integer, integer>

#### (inner) isEven(inputData, inputMetaData) → {boolean}

Determines if the input value is an even number or not an even number. Acts as a wrapper for calling the math operations function of the same name, but this business rule processing the same from a string input.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The value that should be evaluated to determine if it is even or not even.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/mathOperations.js, line 105

##### Returns:

True or False to indicate if the value passed in is an even value or not an even value.

Type
  boolean

#### (inner) isOdd(inputData, inputMetaData) → {boolean}

Determines if the input value is an odd number or not an odd number. Acts as a wrapper for calling the math operations function of the same name, but this business rule processing the same from a string input.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The value that should be evaluated to determine if it is odd or not odd.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/mathOperations.js, line 73

##### Returns:

True or False to indicate if the value passed in is an odd value or not an odd value.

Type
  boolean