Dart API Reference
dart:html
Point
Point<T extends num>
class
A utility class for representing two-dimensional positions.
A utility class for representing two-dimensional positions.
Constructors
Point
(
T
x
,
T
y
)
const
Instance Properties
x
T
read-only
y
T
read-only
hashCode
int
read-only
magnitude
double
read-only
Instance Methods
toString
(
) →
String
Returns a string representation of this object.
distanceTo
(
Point
<T>
other
) →
double
Returns the distance between this and other.
squaredDistanceTo
(
Point
<T>
other
) →
T
Returns the squared distance between this and other.
Operators
operator ==
(
other
) →
bool
A Point is only equal to another Point with the same coordinates.
operator +
(
Point
<T>
other
) →
Point
<T>
Add other to this, as if both points were vectors.
operator -
(
Point
<T>
other
) →
Point
<T>
Subtract other from this, as if both points were vectors.
operator *
(
num
factor
) →
Point
<T>
Scale this point by factor as if it were a vector.