This is an old revision of the document!
<- PRPL reference <- Everything Else 2
Arguments | Result | Notation |
---|---|---|
Coordinates1, Coordinates2 | Distance between Coordinates | [ x1, y1, x2, y2 - f1 ] |
Returns the distance between two given pairs of coordinates. (Or two sets of number pairs on the coordinate plane)
float y1 = GetFloatFromStack(); float x1 = GetFloatFromStack(); float y2 = GetFloatFromStack(); 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