Uses of Class
org.evoludo.geom.Vector2D
Packages that use Vector2D
-
Uses of Vector2D in org.evoludo.geom
Methods in org.evoludo.geom that return Vector2DModifier and TypeMethodDescriptionVector2D.add
(double dx, double dy) Shift the coordinates of this 2D vectordx
to the right anddy
upwards.Add the 2D vectorsa
andb
and store the result in this vector.Add the 2D vectoradd
to this vector.Vector2D.negate()
Negates the coordinates of 2D vectorv
to obtain-v
.Vector2D.normalize()
Normalizes the 2D vectorv
such that its length is|v|=1
while preserving the direction.Vector2D.normalize
(double l) Normalizes the 2D vectorv
such that its length isl
, i.e.Scales the 2D vector by the scalar factors
and adds the 2D vectora
to obtains*v+a
.Set the 2D vector to pointing fromfrom
toto
.Vector2D.sub
(double dx, double dy) Subtractdx
anddy
from coordinates, i.e.Subtract the 2D vectorsub
from this vector.Subtract 2D vectorsb
froma
and store result in this 2D vector.Methods in org.evoludo.geom with parameters of type Vector2DModifier and TypeMethodDescriptionAdd the 2D vectoradd
to this vector.double
Calculate the dot product of 2D vectord
and this vector.Scales the 2D vector by the scalar factors
and adds the 2D vectora
to obtains*v+a
.Set the line to pass through pointp
in the direction of vectorv
.Subtract the 2D vectorsub
from this vector.Subtract 2D vectorsb
froma
and store result in this 2D vector.Constructors in org.evoludo.geom with parameters of type Vector2D -
Uses of Vector2D in org.evoludo.simulator
Fields in org.evoludo.simulator declared as Vector2DModifier and TypeFieldDescriptionprivate final Vector2D
Network2D.attraction
Helper variable to store intermediate results when considering the potential energy resulting from the attraction between neighbouring nodes.private final Vector2D
Network2D.repulsion
Helper variable to store intermediate results when considering the potential energy resulting from the repulsion between nodes.private final Vector2D
Network2D.vec
Temporary storage for the directional vector connecting two nodes.