API:SPoint

From STNE Wiki

Revision as of 19:59, 25 January 2021 by Little Faeries (Talk | contribs)
Jump to: navigation, search
Scripting Portal | Contents | API Reference | Index


The SPoint structure represents a Coordinate in a 2-dimensional-grid.

It is defined with a X-Coordinate and a Y-Coordinate, both as Integers.

Example:

Var point As New SPoint(5,5);

It has also a few Functions and Properties.

Function Parameter Description Return
FromString String 155" Returns a SPoint on success
op_Equality SPoint,SPoint Tests if the Paramaters are identic If the Test passes, it returns True (Boolean), otherwise False
op_Inequality SPoint,SPoint Inversion of op_Equality, tests on differencesf If there are differences, Return True (Boolean), otherwise False
RectangleDiff SPoint Calculates the distance to the given Point by adding the X and Y Difference. Returns the Distance as an Integer