This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| prpl:distance [2016/12/02 23:33] – external edit 127.0.0.1 | prpl:distance [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | | | | [ - ] | | + | | Coordinates1, |
| === Description === | === Description === | ||
| + | Returns the distance between two given pairs of coordinates. (Or two sets of number pairs on the coordinate plane) | ||
| === Examples === | === Examples === | ||
| - | < | + | < |
| - | float x1 = GetFloatFromStack(); | + | CurrentCoords 0 0 Distance |
| - | float y2 = GetFloatFromStack(); | + | <-Distance Trace |
| - | float x2 = GetFloatFromStack(); | + | |
| - | float di = Mathf.Sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)); | + | |
| - | stack.Push(new Data(di)); | + | |
| - | + | ||
| - | </code> | + | |
| + | Self GetUnitPixelCoords < | ||
| + | </ | ||