User Tools

Site Tools


prpl:distance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
prpl:distance [2016/12/21 11:47] Oblivionprpl:distance [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 11: Line 11:
  
 === Examples === === Examples ===
-<code> float y1 = GetFloatFromStack();  +<code> 
- float x1 = GetFloatFromStack();  +CurrentCoords 0 0 Distance ->Distance //Find the distance between itself and 0,0 
- 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)); +
-  +
-        CurrentCoords 0 0 Distance ->Distance //Find the distance between itself and 0,0 +
-        <-Distance trace       +
-</code>+
  
 +Self GetUnitPixelCoords <-SomeUnit GetUnitPixelCoords Distance Trace #This kind of think is useful for image scaling.
 +</code>
prpl/distance.1482320879.txt.gz · Last modified: 2025/02/14 14:56 (external edit)