Vector2Base<V2 extends Vector2Base<V2, M, V3, Q, V4>, M extends MatrixBase<M, V3, Q, V4>, V3 extends Vector3Base<V3, M, Q, V4>, Q extends QuaternionBase<Q, M, V3, V4>, V4 extends Vector4Base<V4, Q, M, V3>> mixin

Backend-agnostic contract for Vector2Base structs.

Must be mixed into every concrete platform implementation of a Raylib type to ensure a unified API surface across different backends.

Superclass constraints

Properties

$state RaylibTempStructState
Per-instance allocation state tracking slot keys, disposal, and identity.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
length double
no setter
lengthSqr double
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
structName String
The Dart-side type name of this struct
no setterinherited
x double
getter/setter pair
y double
getter/setter pair

Methods

add(V2 o) → V2
addValue(num value) → V2
angle(V2 o) double
clamp(V2 min, V2 max) → V2
clampValue(double min, double max) → V2
clone() → V2
Returns a deep copy of this instance, preserving RaylibStructBase.originalPointer if present.
inherited
copy() → V2
Returns a deep copy of this instance without RaylibStructBase.originalPointer.
inherited
distance(V2 o) double
distanceSqr(V2 o) double
div(V2 o) → V2
divideBy(num o) → V2
dotProduct(V2 o) double
equals(V2 o) bool
format([int x0 = 0, int? y0]) String
invert() → V2
lerp(V2 o, double amount) → V2
lineAngle(V2 o) double
max(V2 o) → V2
min(V2 o) → V2
moveTowards(V2 target, double maxDistance) → V2
mul(V2 o) → V2
negate() → V2
normalize() → V2
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reflect(V2 normal) → V2
refract(V2 n, double r) → V2
rotate(double angle) → V2
scale(num o) → V2
set(num x, num y) → V2
setD(V2 o) → V2
Copies the fields of o into this instance and returns this.
inherited
signature() String
Returns a human-readable representation of this struct's current field values.
override
sub(V2 o) → V2
subValue(num value) → V2
toArray() List<double>
toString() String
A string representation of this object.
inherited
transform(M o) → V2

Operators

operator ==(Object other) bool
The equality operator.
inherited