## LiquidBounce Nashorn Utility Lib
### Collection of useful code snippets from all over the internet

NOTICE: If you are the copyright owner of any code provided and want it to be removed, please contact me and it will be removed as soon as possible. 

E-Mail: senkju4@gmail.com

## Features
#### arrayFunctions.js
* **array.includes(value)**: Returns whether or not an array contains a value.

#### glFunctions.js
* **drawRect(paramXStart, paramYStart, paramXEnd, paramYEnd, color)**: Draws a rectangle on the screen
* **drawCircle(paramX, paramY, radius, color)**: Draws a circle on the screen.

#### httpFunctions.js
* **httpGet(url)**: Performs a HTTP GET request and returns the response.
* **httpPost(url, data, contentType)**: Performs a HTTP POST request and returns the response.

#### mathFunctions.js
* **Math.trunc(float)**: Converts a given float to an integer.
* **Math.toRadians(degrees)**: Converts from degrees to radians.
* **Math.toDregrees(radians)**: Converts from radians to degrees.

#### stringFunctions.js
* **string.includes(substring)**: Returns whether or not a string contains a substring.

#### systemFunctions.js
* **copyToClipboard(string)**: Copies a given string to the clipboard
* **getScaledWidth()**: Returns the scaled width of the game
* **getScaledHeight()**: Returns the scaled height of the game

#### timingFunctions
* **setInterval(ms)**: Executes code every x milliseconds
* **clearInterval(interval)**: Clears a given interval
* **setTimeout(ms)**: Executes code after x milliseconds
* **clearTimeout(timeout)**: Clears a given timeout
