# Calculate distance between two points?

GROUPS:
 Hi there,I wrote a code and used the function possibility in order to make the code more lean, however it seems that the function functionality makes the thing not work.I computed the same equation in Excel and get the same answer as the final result of the Mathematica codeHelp would be much appreciated. Not sure what I do wrong within the programming now. I somewhat assume the use of Degree inside the function might cause some trouble, but help is appreciated as mentioned before. Ah and just realised, the screenshot doesn't include the definition of rroller and wgap in Mathematica, but they are as such: wgap = 0.0005 ;(gap width in meters) rroller = 0.1; (roller radius in meters)Cheers, Eric
1 month ago
4 Replies
 Neil Singer 1 Vote Eric,Mathematica uses radians, not degrees. You can either convert to radians (2 Pi/360). You can also use units but to do that you should use Quantity[40, “degrees”] (I am not in front of my machine so I believe degrees is lowercase and plural but I could be wrong - look it up)Regards,Neil