@@ -10,33 +10,33 @@ Y or Z? This article covers a variety of topics related to these dilemmas.
1010
1111.. note ::
1212
13- This article makes references to "[something]-time" operations. This
14- terminology comes from algorithm analysis'
15- `Big O Notation <https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/ >`_.
16-
17- Long-story short, it describes the worst-case scenario of runtime length.
18- In laymen's terms:
19-
20- "As the size of a problem domain increases, the runtime length of the
21- algorithm..."
22-
23- - Constant-time, ``O(1) ``: "...does not increase."
24- - Logarithmic-time, ``O(log n) ``: "...increases at a slow rate."
25- - Linear-time, ``O(n) ``: "...increases at the same rate."
26- - Etc.
27-
28- Imagine if one had to process 3 million data points within a single frame. It
29- would be impossible to craft the feature with a linear-time algorithm since
30- the sheer size of the data would increase the runtime far beyond the time allotted.
31- In comparison, using a constant-time algorithm could handle the operation without
32- issue.
33-
34- By and large, developers want to avoid engaging in linear-time operations as
35- much as possible. But, if one keeps the scale of a linear-time operation
36- small, and if one does not need to perform the operation often, then it may
37- be acceptable. Balancing these requirements and choosing the right
38- algorithm / data structure for the job is part of what makes programmers'
39- skills valuable.
13+ This article makes references to "[something]-time" operations. This
14+ terminology comes from algorithm analysis'
15+ `Big O Notation <https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/ >`_.
16+
17+ Long-story short, it describes the worst-case scenario of runtime length.
18+ In laymen's terms:
19+
20+ "As the size of a problem domain increases, the runtime length of the
21+ algorithm..."
22+
23+ - Constant-time, ``O(1) ``: "...does not increase."
24+ - Logarithmic-time, ``O(log n) ``: "...increases at a slow rate."
25+ - Linear-time, ``O(n) ``: "...increases at the same rate."
26+ - Etc.
27+
28+ Imagine if one had to process 3 million data points within a single frame. It
29+ would be impossible to craft the feature with a linear-time algorithm since
30+ the sheer size of the data would increase the runtime far beyond the time allotted.
31+ In comparison, using a constant-time algorithm could handle the operation without
32+ issue.
33+
34+ By and large, developers want to avoid engaging in linear-time operations as
35+ much as possible. But, if one keeps the scale of a linear-time operation
36+ small, and if one does not need to perform the operation often, then it may
37+ be acceptable. Balancing these requirements and choosing the right
38+ algorithm / data structure for the job is part of what makes programmers'
39+ skills valuable.
4040
4141Array vs. Dictionary vs. Object
4242-------------------------------
@@ -52,12 +52,13 @@ contents in a contiguous section of memory, i.e. they are in a row adjacent
5252to each other.
5353
5454.. note ::
55- For those unfamiliar with C++, a Vector is the name of the
56- array object in traditional C++ libraries. It is a "templated"
57- type, meaning that its records can only contain a particular type (denoted
58- by angled brackets). So, for example, a
59- :ref: `PackedStringArray <class_PackedStringArray >` would be something like
60- a ``Vector<String> ``.
55+
56+ For those unfamiliar with C++, a Vector is the name of the
57+ array object in traditional C++ libraries. It is a "templated"
58+ type, meaning that its records can only contain a particular type (denoted
59+ by angled brackets). So, for example, a
60+ :ref: `PackedStringArray <class_PackedStringArray >` would be something like
61+ a ``Vector<String> ``.
6162
6263Contiguous memory stores imply the following operation performance:
6364
@@ -294,7 +295,7 @@ faster than string comparisons (linear-time). If one wants to keep
294295up other languages' conventions though, then one should use integers.
295296
296297The primary issue with using integers comes up when one wants to *print *
297- an enum value. As integers, attempting to print MY_ENUM will print
298+ an enum value. As integers, attempting to print `` MY_ENUM `` will print
298299``5 `` or what-have-you, rather than something like ``"MyEnum" ``. To
299300print an integer enum, one would have to write a Dictionary that maps the
300301corresponding string value for each enum.
@@ -314,7 +315,7 @@ The answer may not be immediately clear to new Godot users.
314315the engine draws as an animated loop rather than a static image.
315316Users can manipulate...
316317
317- 1. the rate at which it moves across each section of the texture (fps ).
318+ 1. the rate at which it moves across each section of the texture (FPS ).
318319
3193202. the number of regions contained within the texture (frames).
320321
@@ -346,7 +347,7 @@ the AnimatedSprite2D.
346347AnimationPlayers are also the tool one will need to use if they wish to design
347348more complex 2D animation systems, such as...
348349
349- 1. **Cut-Out animations: ** editing sprites' transforms at runtime.
350+ 1. **Cut-out animations: ** editing sprites' transforms at runtime.
350351
3513522. **2D Mesh animations: ** defining a region for the sprite's texture and
352353 rigging a skeleton to it. Then one animates the bones which
0 commit comments