ZenoTest
ZenoTest — Windows Desktop UI Testautomatisierung für Qt, WPF, WinForms & native Apps. Aufzeichnen, skripten und automatisierte GUI-Tests mit CI/CD-Integration ausführen.

vec2d

Description
Represents a 2-dimensional vector object consisting of two floating-point values (x, y).
vec2d provides arithmetic operators, value assignment, printing and resetting, as well as several vector-specific script methods like normalization, length calculation and null-vector checking.

An vec2d is typically created and manipulated inside scripts when 2D positions, offsets or directions are required.

Methods
void normalize()
Normalizes the vector so that its length becomes 1 (unit vector).
If the vector is a null vector, no change is applied.

float length()
Returns the floating-point vector length calculated as sqrt(x*x + y*x).

bool isNull()
Checks whether the vector is a null vector (x = 0 and y = 0).
Returns true if the vector is zero-length.

void set(float x, float y)
Assigns new floating-point values to the vector.
Example: v.set(10.0, 5.0);

Operators
vec2d supports the operators +, - and * with another vector, returning a new vec2d.

Example
void main()
{
    vec2d v(3.0, 4.0);
    float len = v.length();
    Print("Length: " + len);
    
    v.normalize();
    Print("Normalized vector length: " + v.length());
    
    bool isZero = v.isNull();
    Print("Is Null Vector: " + isZero);
    
    v.set(10.0, 5.0);
    Print("Vector set to ");
    Print(v);
}
#define #include abs Array ceil CloseAUT Console mode do...while DoubleClick DragAndDrop Execute Fail File floor for Format GetAUTFileVersion GetAUTProductVersion GetAUTQtVersion GetAUTSuspectedCompiler GetAUTSuspectedFramework GetClipboard GetCurrentDate GetCurrentTime GetCurrentWorkingDir GetEnv GetName GetProcessID GetProcessIDHandle GetQtProperty GetText GetTimestamp GetValue Handle HasFocus IsAUT64Bit IsChecked IsEnabled IsVisible LeftMouseClick LeftMouseDown LeftMouseUp max MiddleMouseClick MiddleMouseDown MiddleMouseUp min MouseMove MouseWheel Pass pow Predefined Constants Print rand Regex RegexMatch RightMouseClick RightMouseDown RightMouseUp round Script Language SendKeys SendMessage SetClipboard SetFocus SetGlobal SetQtProperty ShellProcess Sleep sqrt srand StartAUT string TerminateProcess TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEmpty VerifyEndsWith VerifyEqual VerifyExists VerifyFalse VerifyGreater VerifyGreaterEqual VerifyLess VerifyLessEqual VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith VerifyTrue WaitForControl WaitUntilEnabled WaitUntilVisible while