I’m currently designing a program that will involve some physics (nothing too fancy, a few balls crashing to each other)
What’s the most exact datatype I can use to represent position (without a feeling of discrete jumps) in c#?
Also, what’s the smallest ammount of time I can get between t and t+1? One tick?
EDIT: Clarifying: What is the smallest unit of time in C#? [TimeSpan].Tick?
In .Net a
decimalwill be the most precise datatype that you could use for position. I would just write a class for the position:As for time, your processor can’t give you anything smaller than one tick.
Sounds like an fun project! Good luck!