Vec2 class

2D point/vector.

Constructors

Vec2(double x, double y)
const
Vec2.fromJson(Map<String, dynamic> json)
Fail-fast: requires numeric x and y.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
length double
no setter
normalized Vec2
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x double
final
y double
final

Methods

copyWith({double? x, double? y}) Vec2
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator *(double s) Vec2
operator +(Vec2 o) Vec2
operator -(Vec2 o) Vec2
operator /(double s) Vec2
operator ==(Object other) bool
The equality operator.
override

Constants

zero → const Vec2