Portal maths performs calculations for portals.
So for example, if a speed thing goes into one portal, a speedy thing will come out the other portal. But if one portal is on the ground, and another portal is against a wall, they have different angles. So the orientation of the source and destination portals affects the velocity.
I once made a cool portal example thing...not sure if i uploaded it...looking for it now