ij-macro-programming-workshop

Previous            Exercise            Next

Exercise 02.02 - Numbers - Calculations

Aims:

Calculate the Euclidean Distance between two points. The coordinates of the two points are:

"\\Clear";

Your code starts after this line.

	sqrt(((167-56) * (167-56)) + ((245-78) * (245-78)));
> 200.5243

Your code ends before this line.

The code below is for automatically checking the result. Please ignore it!

result = parseInt(toString(floor(parseFloat(getInfo("log")))), 36);
if (result==2592) showMessage("That's right. Great, you did it!");
else showMessage("Your result is wrong! Please check your macro and try again!");

Previous            Exercise            Next