evaluatePitchRoll()

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

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:

evaluatePitchRoll(
	'pitch',
 	-50
)

Warning

The visual example is not updated, but the working is exactly the same.