Point64 class

Point64 describes a point whose coordinates are integer. On native platforms, the range is full 64 bits; on the web, the range is 52 bits.

Constructors

Point64(int x, int y, [int z = 0])
Default constructor.
const
Point64.fromDouble(double x, double y, {int z = 0, double scale = 1})
Create a Point64 from floating point coordinates, optionally scaling them by scale.
factory
Point64.fromPointD(PointD point, {double scale = 1})
Create a Point64 from a PointD, optionally scaling the coordinates by scale.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
negated Point64
Negation of the point.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x int
X coordinate of the point.
final
y int
Y coordinate of the point.
final
z int
Z coordinate of the point. Z is not used in calculations; it is provided for the user of the library.
final

Methods

copy(int x, int y) Point64
Copy the point, preserving auxiliary data.
copyToD(double x, double y) PointD
Copy the point to a PointD, preserving auxiliary data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
perpendicDistFromLineSqrd(Point64 line1, Point64 line2) double
Calculate the squared perpendicular distance of the point from a line.
reflected(Point64 pivot) Point64
Reflext the point around pivot.
scaled(double scale) Point64
Scale the point by dx, dy.
toString() String
A string representation of this object.
override
translated(int dx, int dy) Point64
Translate the point by dx, dy.

Operators

operator +(Point64 other) Point64
Sum of two Point64s interpreted as vectors.
operator -(Point64 other) Point64
Difference of two Point64s interpreted as vectors.
operator ==(Object other) bool
The equality operator.
override