Computer Science Canada WhatDotColour : MathDistancePointLine |
Author: | Anonymous [ Mon Jun 05, 2006 10:48 pm ] | ||
Post subject: | WhatDotColour : MathDistancePointLine | ||
I decided to make a program to test whatdotcolour's collision detection. But I hear people bashing whatdotcolour sometimes and saying learn Math.DistancePointLine (kinda like the main loops and processes). But I looked in the Turing help menu, and that always confuses me. I usually learn by looking at others code and figuring out how it works on my own. Will someone convert this using Math.DistancePointLine. I did look at the <A HREF="http://www.compsci.ca/v2/viewtopic.php?t=12502">Tutorial</A>, but I dont really understand it. Besides, I want a direct comparison between my program and Math.DistancePointLine.
|
Author: | TheOneTrueGod [ Tue Jun 06, 2006 6:53 am ] | ||
Post subject: | |||
Turing F10 wrote: Math.DistancePointLine (xp, yp, x1, y1, x2, y2 : real) : real (xp,yp) is the point that you are checking (Math.DistancePointLine (x1,y1) is the first point of the line (x2,y2) is the second point of the line Now, as it should be obvious, if you have one point, and one line, there are infinitely many ways that you can measure the distance between those two. (Unless the line isn't a line, and is just a point. But then it isn't a line ![]()
^^^^^^^^^^^^^^^^^ That is copied directly from the F10 help menu. If you ever do not understand how a command works, just look at the F10 menu. It gives you basically anything you need, from source code to how to use the command written out in words. |