API:SPoint

From STNE Wiki

(Difference between revisions)
Jump to: navigation, search
(Added Functions)
Line 18: Line 18:
|FromString
|FromString
|String
|String
-
|Creates a new SPoint from a String Value, e.g. "155|155"
+
|Creates a new SPoint from a String Value, e.g. "155<nowiki>|</nowiki>155"
|Returns a SPoint on success
|Returns a SPoint on success
|-
|-

Revision as of 20:00, 25 January 2021

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 Creates a new SPoint from a String Value, e.g. "155|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
Personal tools