public static final class Vector3D.Sum extends EuclideanVectorSum<Vector3D>
Sum
.
This class is mutable and not thread-safe.
Sum
Modifier and Type | Method and Description |
---|---|
Vector3D.Sum |
add(Vector3D vec)
Add a vector to this instance.
|
Vector3D.Sum |
addScaled(double scale,
Vector3D vec)
Add a scaled vector to this instance.
|
static Vector3D.Sum |
create()
Create a new instance with an initial value set to the
zero vector . |
Vector3D |
get() |
static Vector3D.Sum |
of(Vector3D initial)
Construct a new instance with an initial value set to the argument.
|
static Vector3D.Sum |
of(Vector3D first,
Vector3D... more)
Construct a new instance from multiple values.
|
accept
public Vector3D.Sum add(Vector3D vec)
add
in class EuclideanVectorSum<Vector3D>
vec
- vector to addpublic Vector3D.Sum addScaled(double scale, Vector3D vec)
sum.addScale(scale, vec)
will generally produce a better result than
sum.add(vec.multiply(scale))
.addScaled
in class EuclideanVectorSum<Vector3D>
scale
- scale factorvec
- vector to scale and addpublic static Vector3D.Sum create()
zero vector
.public static Vector3D.Sum of(Vector3D initial)
initial
- initial sum valuepublic static Vector3D.Sum of(Vector3D first, Vector3D... more)
first
- first vectormore
- additional vectorsCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.