# Skript

The central library.

The root-level `skript`

namespace is provided by ByteSkript and contains a number of basic functions and operations for controlling the system or providing useful functionality.

The `skript`

library is available by default, so functions can be run directly with `function(args)`

rather than the external `function(args) from library`

.

This library is currently implemented in Java.

### Generic

These functions provide basic utilities, mostly related to the JDK `System`

class.

Function | Description |
---|---|

| Returns the |

| Returns the given atomic variable as a regular object to be stored in a value variable. |

| Returns the current time in milliseconds as a |

| Returns the system's line-separator character ( or etc.) |

| Returns the system nanosecond time as a |

| Returns the provided |

| Performs a strict |

| Creates a 'weak' reference to an object. |

| Creates a 'soft' reference to an object. |

| Retrieves the value of a reference. |

### Maths

These functions provide basic mathematical operators and routines.

All have null-safety and will treat a `null`

value as `0`

. If a non-number is passed as a parameter, the function will throw an error when trying to convert it.

All trigonometric functions are provided in **degrees**. All hyperbolic functions return in **degrees**.

Function | Description |
---|---|

| Returns the absolute (positive) value of the number. |

| Returns the square root of the number. |

| An alternative root function when accuracy can be sacrificed for speed. The |

| Raises the value to the nearest integer. |

| Lowers the value to the nearest integer. |

| Rounds the value to the nearest integer. |

| Returns the natural logarithm of the value. |

| Returns the logarithm of the value. |

| Converts radians to degrees. |

| Converts degrees to radians. |

| Sine function. |

| Cosine function. |

| Tangent function. |

| Hyperbolic sine function. |

| Hyperbolic cosine function. |

| Hyperbolic tangent function. |

| Arcus sine function. |

| Arcus cosine function. |

| Arcus tangent function. |

| Two-argument arcus tangent function. |

### Handles

These functions can be used to obtain executable 'handles' or values of members from Java classes.

Advanced users may use these to run Java code.

Function | Description |
---|---|

| Provides an executable for a Java method. The |

| Provides an executable for a Java method with no parameters. The |

| The |

| The |

| The |

Last updated