Commit graph

29 commits

Author SHA1 Message Date
Anutrix
a871114339 Randomize RandomNumberGenerator instances' default seed 2022-10-08 12:26:26 +05:30
Andy Maloney
1df86ecea5 [doc] Use "param" instead of "code" to refer to parameters (4) 2022-08-11 13:52:19 -04:00
Yuri Sizov
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Hugo Locurcio
b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
Rémi Verschelde
6c1bd4d227
Replace Godot docs URL with $DOCS_URL in XML class reference 2021-11-15 13:02:21 +01:00
Aaron Franke
d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
Aaron Franke
ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions 2021-08-22 20:13:11 -05:00
Rémi Verschelde
7adf4cc9b5
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
Hugo Locurcio
7d4c20f9db
Improve and clarify documentation for RandomNumberGenerator 2021-07-02 17:47:52 +02:00
Pedro J. Estébanez
04688b92ff Rename Reference to RefCounted 2021-06-11 18:48:42 +02:00
Andrii Doroshenko (Xrayez)
b5107715f1 Add ability to restore RandomNumberGenerator state
- added `state` as a property to restore internal state of RNG;
- `get_seed()` returns last seed used to initialize the state rather than the current state.

Co-authored-by: MidZik <matt.idzik1@gmail.com>
2020-12-07 13:50:46 +02:00
Rémi Verschelde
35e6070a35
doc: Override default value for RandomNumberGenerator.seed
It's non-deterministic so it's better to show a fixed value like 0 instead of
having it potentially change whenever `randomize()` is called.

Fixes #43317.
2020-11-05 00:41:24 +01:00
Hugo Locurcio
802c1e4df1
Link the Random number generation tutorial in the class reference 2020-10-14 18:03:29 +02:00
clayjohn
57e27683ba Update docs to version 4.0 2020-01-31 17:15:41 -08:00
Rémi Verschelde
2d20fc39aa doc: Drop unused 'category' property from header
We already removed it from the online docs with #35132.

Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.

We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
2020-01-26 16:02:39 +01:00
tree786
68c6790baf Added example on how to use RandomNumberGenerator 2019-06-30 16:41:45 +01:00
Rémi Verschelde
c6cea6e9b3 doc: Add default values to all properties
Thanks to @bojidar-bg's impressive work in #29380.
2019-06-30 13:58:07 +02:00
Hugo Locurcio
f7f6115f76
Proofread and improve the whole class reference
- Document a few more properties and methods
- Add more information to many classes
- Fix lots of typos and gramar mistakes
- Use [code] tags for parameters consistently
- Use [b] and [i] tags consistently
- Put "Warning:" and "Note:" on their own line to be more visible,
  and make them always bold
- Tweak formatting in code examples to be more readable
- Use double quotes consistently
- Add more links to third-party technologies
2019-06-27 22:30:19 +02:00
Rémi Verschelde
6af69f851a doc: Drop unused <demos> tag 2019-04-19 11:03:46 +02:00
Rémi Verschelde
e3b26b0d68
Merge pull request #27591 from toasteater/doc/rng-impl-notes
Improve RandomNumberGenerator docs.
2019-04-09 10:28:44 +02:00
Yuri Roubinsky
134be5c728
Merge pull request #27043 from Chaosus/randfn
Added gaussian distribution function to RNG
2019-04-07 08:32:04 +03:00
toasteater
ae1393acae Improve RandomNumberGenerator docs.
Clarified behavior of a few methods. Added implementation notes so
that developers not familiar with RNGs are alerted to common pitfalls.
2019-04-02 22:42:49 +08:00
Rémi Verschelde
39c868171e doc: Bump version to 3.2 2019-04-01 12:33:56 +02:00
Chaosus
5f137925dc Added normally distributed generation function to RNG 2019-03-17 08:09:46 +03:00
Rémi Verschelde
4e0eb752c2 doc: Fix style issues 2019-02-18 09:45:10 +01:00
Rémi Verschelde
d030c17d5e doc: Sync classref with current source 2018-12-13 15:12:25 +01:00
Chaosus
d376be2bf4 Added integer number generation function to RNG class 2018-12-06 14:49:52 +03:00
Rémi Verschelde
072aaf98e8 doc: Sync classref with current source 2018-11-13 11:06:50 +01:00
Chaosus
f8151a9e50 Implement random number generator
Co-authored-by: Zirak <zirakertan@gmail.com>
2018-11-13 10:50:07 +03:00