# UnitsModule

The `UnitsModule` class provides functionality for converting values into world-space units.

## Example

```
//==============================================================================
// The following example demonstrates how to convert values into world-space
// units.
//
// Project setup:
// - Set the default unit via Properties > General > Unit of Measurement
//==============================================================================

// Load in the required modules
const Diagnostics = require('Diagnostics');
const Units = require('Units');

// Create a variable we will use to convert
const value = 5;

// Convert the value into other units
Diagnostics.log(value + ' cm => ' + Units.cm(value));
Diagnostics.log(value + ' ft => ' + Units.ft(value));
Diagnostics.log(value + ' in => ' + Units.in(value));
Diagnostics.log(value + ' m => '  + Units.m(value));
Diagnostics.log(value + ' mm => ' + Units.mm(value));
Diagnostics.log(value + ' yd => ' + Units.yd(value));
```

## Properties

This module exposes no properties.

## Methods

| Method | Description                                                                                                       |
| ------ | ----------------------------------------------------------------------------------------------------------------- |
| `cm`   | <p><code>cm(centimeters: number): number</code></p><p>Converts the specified centimeter value to world units.</p> |
| `ft`   | <p><code>ft(feet: number): number</code></p><p>Converts the specified foot value to world units.</p>              |
| `in`   | <p><code>in(inches: number): number</code></p><p>Converts the specified inch value to world units.</p>            |
| `m`    | <p><code>m(meters: number): number</code></p><p>Converts the specified meter value to world units.</p>            |
| `mm`   | <p><code>mm(millimeters: number): number</code></p><p>Converts the specified millimeter value to world units.</p> |
| `yd`   | <p><code>yd(yards: number): number</code></p><p>Converts the specified yard value to world units.</p>             |

## Classes

This module exposes no classes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sparkar-community.gitbook.io/docs/unitsmodule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
