MechWarrior99
MechWarrior99
CC#
Created by MechWarrior99 on 8/14/2024 in #help
Arrange points in circle with a Sweep parameter
Ahh you're right. That's unfortunate, oh well. Thank you for explaining how I was thinking about it wrong. Guess I will just pick something.
8 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
I'm using .NET 8.0
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
Huh interesting, thanks for the link
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
Yeah, guess that is true. So... not that surprising haha
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
Oh thanks for the link. I didn't realize that is literally what it is called. Or that it seems pretty easy to implement. I might give that a go and see how it performs. Still a bit surprised there isn't more libraries for C# that deal with random numbers and randomness (just in general)
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
I remember seeing something about using xor-shift to get random numbers, but couldn't find a lot on it. 🤔
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
Yeah I don't really mind if it is a bit worse randomness (I think at least haha)
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
Yeah
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
Ah good to know, but I actually reset the seed each time, which is why I create a new instance each time.
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
I have a large process which I create a new instance of Random for each time, since the process runs in a Task in a separate thread.
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
Yeah, not a massive one, but definitely is one.
52 replies
CC#
Created by MechWarrior99 on 1/21/2024 in #help
How to safely access parameters from Task (Porting from Unity IJob)
Ahh I see, thank you. I will keep .ConfigureAwait() in mind, wasn't aware of it! I was aware of LongRunning, but I don't think it applies in this case as I want the the generation to happen in 'real time' (less than ~100ms) as the user changes properties in the UI. So if it is taking longer than that, I need to do some more optimization haha.
36 replies
CC#
Created by MechWarrior99 on 1/21/2024 in #help
How to safely access parameters from Task (Porting from Unity IJob)
Appreciate the info! And yeah, as Burrito said, this is not in Unity, just familiar with the Unity Jobs system and way of doing things. And trying to understand how you would do the same in a plain C# app.
36 replies
CC#
Created by MechWarrior99 on 1/21/2024 in #help
How to safely access parameters from Task (Porting from Unity IJob)
Alrighty, well this definitely gives me clarity on it all. Thank you for the help and insight as always! 😄
36 replies
CC#
Created by MechWarrior99 on 1/21/2024 in #help
How to safely access parameters from Task (Porting from Unity IJob)
What would be the way you would recommend doing it? Variable capture? Record? Struct?
36 replies
CC#
Created by MechWarrior99 on 1/21/2024 in #help
How to safely access parameters from Task (Porting from Unity IJob)
Ooh yeah I totally forgot you could define records like that!
36 replies
CC#
Created by MechWarrior99 on 1/21/2024 in #help
How to safely access parameters from Task (Porting from Unity IJob)
Huh, didn't realize they were immutable. Interesting!
36 replies