Ok. Happy to be wrong. So I have this type (no mutable before struct):
struct Point3D <: FieldVector{3, Float64}
x::Float64
y::Float64
z::Float64
end
How do I cleanly update only one component of that type and replace the existing type with the newly modified one so:
p1 = Point3D(1.0, 2.0, 3.0)
p1 = p1.x + 1.0 ?? Gives p1 as a scalar
Confused, surely not:
p1 = ((p1.x + 1.0, p1.y, p1.z))