Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI
Private pz As Tuple
End Sub
Public Sub Initialize
pz.Initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
someSub
End Sub
Sub someSub
Dim p0 As Tuple = pz.XY(100, 5)
Dim p1 As Tuple = pz.XY(-100, -5)
Dim sum As Tuple = p0.Add(p1)
Dim dif As Tuple = p0.Subtract(p1)
Dim more As Tuple = p0.Add(pz.XY(25, 35)).Subtract(pz.XY(5, 5))
Log(p0) 'x=100.0, y=5.0
Log(p1) 'x=-100.0, y=-5.0
Log(sum) 'x=0.0, y=0.0
Log(dif) 'x=200.0, y=10.0
Log(more) 'x=120.0, y=35.0
End Sub