---
title: "evaluatePitchRoll()"
canonical: "https://onesaitplatform.refined.site/space/DOCT/2220800948/evaluatePitchRoll()"
format: markdown
---
> ℹ️ **Information**
> ℹ️ 
> ℹ️ Implementation version: beta 1.08
> ℹ️ 
> ℹ️ Updated in: beta 1.09

# Description

It checks whether the value entered as pitch or roll is valid or not, and if its not, it will return a default correct value.

# Invocation

```javascript
evaluatePitchRoll(
	checkParam,
 	value
)
```

# Input parameters

## checkParam

Indicates the property against which the entered value will be evaluated. It is inserted as a text string, and it accepts one of these two possibilities:

1. **pitch**: to evaluate the pitch.
2. **roll**: to evaluate the roll.

## value

The numerical value to evaluate. Depending on the parameter against which it is evaluated, it will accept the following values:

1. **In the case of pitch**: between 270 (camera focused towards the center of the Earth) and 360 (camera focused towards the horizon). Outside this range, it will return 270.
2. **In the case of roll**: between 90 (camera rotated 90 degrees clockwise) and -90 (camera rotated 90 degrees counterclockwise). Outside this range, it will return 0.

# Use example

Check several camera pitch values:

```javascript
evaluatePitchRoll(
	'pitch',
 	-50
)
```

![image](media://4db50f2d-c76e-46c6-a1ca-d4067589af2e)

> ❌ **Warning**
> ❌ 
> ❌ The visual example is not updated, but the working is exactly the same.