checkValue(value: Number);
value. New cylinder value. Method parameter cannot be negative.
The checkValue method adjusts cylinder value.
To execute the example, the HTML page must contain the Cylinder component named cylinder (see Example of Creating the Cylinder Component). Adjust cylinder value:
// Adjust cylinder value var currentValue = cylinder.getValue().checkValue(16); console.log("Corrected value Adjusted cylinder value: %s", currentValue);
After executing the example the browser console displays adjusted cylinder value:
Adjusted cylinder value: 10
See also: