# Feedback on a 2d spring simulation

**URL:** <https://discourse.julialang.org/t/feedback-on-a-2d-spring-simulation/88350>\
**Category:** Numerics\
**Created:** [October 6, 2022, 2:34pm UTC](https://discourse.julialang.org/t/feedback-on-a-2d-spring-simulation/88350 "2022-10-06T14:34:41Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [October 7, 2022, 6:17pm UTC](https://discourse.julialang.org/t/feedback-on-a-2d-spring-simulation/88350/10 "2022-10-07T18:17:01Z")

</div>

The example runs if you define:

```julia
julia> using StaticArrays

julia> mutable struct Point{T} <: FieldVector{2,T}
           x::T
           y::T
       end

```

Which will give you all the algebra of arrays to your point. The error of missing `oneunit(::Any)` is pretty bad, though.

---

_[View the full topic](https://discourse.julialang.org/t/feedback-on-a-2d-spring-simulation/88350)._
