Skip to main content
Editing Step 5 —

Step Type:

Drag to rearrange

Ranges help to eliminate junk data that sometimes shows up on the screen. Overall, it makes the data look precise and organized. This is also before the set-up.

if (distance> x) {distance=x;} //states that if the distance calculated is greater than a certain number, then the ranges causes the distance to equal that certain number (establishes "x" as the maximum number)

if (distance<y) {distance=y;} //states that if the distance calculated is less than a certain number, then the range causes the distance to equal that certain number (establishes "y" as the minimum number)

return (distance); //returns the desired distance

Your contributions are licensed under the open source Creative Commons license.