There are many const T* parameters in Box2D. The easy way is to treat all of them as ref, i.e. not caring about the const part. However, this not only causes unnecessary friction when using the methods, such as the need to declare parameters on a separate line (you can just supply a value to an in parameter), but also loses the readonly intention of the pointer. It may be more correct to expose these pointers as in instead of ref.
Documentation on in vs ref: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/method-parameters#reference-parameters
There are many
const T*parameters in Box2D. The easy way is to treat all of them asref, i.e. not caring about theconstpart. However, this not only causes unnecessary friction when using the methods, such as the need to declare parameters on a separate line (you can just supply a value to aninparameter), but also loses the readonly intention of the pointer. It may be more correct to expose these pointers asininstead ofref.Documentation on
invsref: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/method-parameters#reference-parameters