16 Commits
Author SHA1 Message Date
MoonyandPJB3005 ecfaa68ae6 Deprecate System.Random leakage 2026-02-08 14:09:48 +01:00
PJB3005 5f1327808d Mark IRobustRandom.GetRandom() as obsolete
This API should've never existed.
2025-12-24 16:03:06 +01:00
PJB3005 b4a0dad67a Fix tests on .NET 10
Fixes #6329
2025-12-14 17:46:41 +01:00
73c1449811 Add GetItems() extension for IRobustRandom (#4975)
* refactor: RobustRandom and RandomExtensions namespace change to file-scoped

* refactor: IRobustRandom xml-doc methods rearranged to be more structured.

* feat: GetItems methods added to RandomExtensions, tests for new methods added.

* fix: GetItems will not request count-1 from next random, as System.Random.Next have upper bound excluded.

* fix: enforced standard deviation on picking next items in RandomExtensions.GetItems + fixed hashet initial capacity +removed mandatory hashset allocation

* refactor: specified border values interaction in IRobustRandom xml-doc

* refactor: updated relese-notes

* refactor: changed release-notes PROPERLY

* fix: order by which unique random items are picked in RandomExtensions.GetItems were fixed to ACTUALLY follow normal distribution

* refractor: added comment for devious RandomExtensions.GetItems only-unique logic

* reduce code duplication

* Cleanup code a bit

Rename variables, and make it a bit more compact.
Also, IMO the description is unnecessary

* Remove obsolete extension

* Remove incorrect O(n) comments.

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2024-03-30 10:42:39 +11:00
metalgearslothandGitHub 7592997f4e Add random pick / take methods for sets (#4821)
* Add random pick / take methods for sets

I want it don't at me.

* cleanup (mraow)

* Revert "cleanup (mraow)"

This reverts commit e279957f21.

* flatpak

* notes
2024-01-09 00:37:19 +11:00
Leon FriedrichandGitHub 89c1e90646 Add IRobustRandom.SetSeed() (#4606) 2023-11-25 15:32:16 -08:00
metalgearslothandGitHub b486ef885c Add NextAngle for System.Random (#4522) 2023-10-29 04:22:32 +11:00
metalgearslothandGitHub 7d1ad527d9 Replace Robust Vector2 with System.Numerics (#4092) 2023-07-08 14:08:26 +10:00
metalgearslothandGitHub 9bb61b8a35 Add NextByte to random methods (#4151) 2023-06-25 21:52:15 +10:00
metalgearslothandGitHub 410957be46 Random shuffle overrides (#3912) 2023-04-09 11:56:42 +10:00
metalgearslothandGitHub 2f7a652e22 Add helper methods for System.Random (#3832)
This might be a maint thing but look, I just want seeded RNG and IRobustRandom doesn't have it so not sure what is easier considering IRobustRandom is also registered as a depdency but constructing it manually is weird aaaa
2023-03-09 16:04:23 -06:00
metalgearslothandGitHub 81cd43f988 Random timespan support (#3458) 2022-11-10 23:32:52 +01:00
Leon FriedrichandGitHub e07a4e516c Add random vector functions to IRobustRandom (#2551) 2022-02-17 18:05:12 +11:00
metalgearslothandGitHub 43081c57e7 Add acruid's funny entity query (#2440) 2022-01-21 10:45:10 +11:00
726bfd58f6 adds some helpers to robustrandom (#1969)
Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
2021-08-23 20:32:51 +02:00
AcruidandGitHub 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00