0

Hello everyone,

I am confuse to what my professor is asking for Part 4 of our project.

--> The fourth method for you to develop must manipulate the Colors within a given box. To compute how much manipulation to do on a Pixel from its LOCATION (x,y), the function defined by the method below

```
public static double normalizedValue (double num, double rangeMin, double rangeMax)
{
return(num / (rangeMax - rangeMin);
}
```

For example the coordinate x varies between the values xMin and xMax parameters given by the caller. It is useful to have a number in the 0.0 to 1.0 range, computed from x. That useful number will be computed and returned when you program the expression normalizedValue(x, xMin, xMax)

```
public static double distance (int x1, int y1, int x2, int y2)
{
double x1d = (double) x1;
double x2d = (double) x2;
double y1d = (double) y1;
double y2d = (double) y2;
return Math.sqrt((x2d-x1d)*(x2d-x1d) + (y2d - y1d)*(y2d - y1d)));
} <--- Can someone explain this piece of code to me, my professor explanation confused me.
```

I am confuse about the pieces of code.