# Static Functions

Static functions have specialized use in template rules. This page covers static functions in the `math`, `object`, and `sfdc_fma` namespaces.

## `math:pow`

Parameters: `Double base`, `Double exponent`

Returns: `Double`

Recursive: Not supported

Description: Returns the value of the first argument raised to the power of the second argument.

### Example

This function call:

```json
{
    "pow": "${math:pow(5, 5)}"
}
```

Returns:

```json
{
    "pow": 3125.0
}

```

## `math:min`

Parameters: `Double a`, `Double b`

Returns: `Double`

Recursive: Not supported

Description: Returns the smaller of the two values.

### Example

This function call:

```json
{
    "min": "${math:min(5, 10)}"
}
```

Returns:

```json
{
    "min": 5.0
}

```

## `math:max`

Parameters: `Double a`, `Double b`

Returns: `Double`

Recursive: Not supported

Description: Returns the greater of the two values.

### Example

This function call:

```json
{
    "max": "${math:max(5, 10)}"
}
```

Returns:

```json
{
    "max": 10.0
}

```

## `math:round`

Parameters: `Double x`, `Int scale`

Returns: `Double`

Recursive: Not supported

Description: Rounds the given value to the specified number of decimal places.

### Example

This function call:

```json
{
    "round": "${math:round(12.983665, 3)}"
}
```

Returns:

```json
{
    "round": 12.984
}

```

## `object:contains`

Parameters: `Object map`, `Object key`

Returns: `Boolean`

Recursive: Not supported

Description: Returns if the map contains a non-null value at the specified key

### Example

For the following map:

```json
{
    "fieldsMap": [{"field1": "ProductName"},
                  {"field2": "Amount"},
                  {"field3": "CompanyName"},
                  {"field4": "Revenue"}]
}
```

This function call:

```json
{
    "contains": "${object:contains(Variables.fieldsMap, 'field3')}"
}
```

Returns:

```json
{
    "contains": true
}

```

## `sfdc_fma:checkInteger`

Parameters: `String apiName`

Returns: `Int`

Recursive: Not supported

Description: Returns the integer value of the LMO to subscriber FMA value for `checkPackageIntegerValue`.

For more information and examples, see the [Feature Management methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_System_FeatureManagement.htm#apex_System_FeatureManagement_checkPackageIntegerValue).

## `sfdc_fma:checkBoolean`

Parameters: `String apiName`

Returns: `Boolean`

Recursive: Not supported

Description: Returns the boolean value of the LMO to subscriber FMA value for `checkPackageBooleanValue`.

For more information and examples, see the [Feature Management methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_System_FeatureManagement.htm#apex_System_FeatureManagement_checkPackageBooleanValue).

## `sfdc_fma:checkDate`

Parameters: `String apiName`

Returns: `Date`

Recursive: Not supported

Description: Returns the date value of the LMO to subscriber FMA value for `checkPackageDateValue`.

For more information and examples, see the [Feature Management methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_System_FeatureManagement.htm#apex_System_FeatureManagement_checkPackageDateValue).
