How can I lerp between two 3d vectors?
I use this method for 2d vectors:

```
public Vector2d lerp(Vector2d other, double speed, double error) {
    if (equals(other) || getDistanceSquared(other) <= error * error)
        return other;
    double dx = other.getX() - this.x, dy = other.getY() - this.y;
    double direction = Math.atan2(dy, dx);
    double x = this.x + (speed * Math.cos(direction));
    double y = this.y + (speed * Math.sin(direction));
    return new Vector2d(x, y);
}

```

Note: this is not exactly "linear interpolation"; this method will interpolate at a constant rate, which is what I want.

I want to do exactly what this does but with an added z component for the third dimension. How can I do this?