Note that **only 7 function out of 470** require more than 6 parameters. This is what makes raylib so special.
Note that **only 7 function out of 470** require more than 6 parameters. This is what makes raylib so special.
@ -253,37 +253,37 @@ About the fields contained in every struct, it was tried to just include the min
count | struct name | fields count | comments
count | struct name | fields count | comments
:--:| :---------: | :-------: | :--------
:--:| :---------: | :-------: | :--------
01 | Vector2 | 2 |
02 | Vector3 | 3 |
03 | Vector4 | 4 |
04 | Matrix | 4 |
05 | Color | 4 |
06 | Rectangle | 4 |
07 | Image | 5 |
08 | Texture | 5 |
09 | RenderTexture | 3 | _2 words name_
10 | NPatchInfo | 6 | _2 words name_
11 | CharInfo | 5 |
12 | Font | 6 |
13 | Camera3D | 5 |
14 | Camera2D | 4 |
15 | Mesh | **15** |
16 | Shader | 2 |
17 | MaterialMap | 3 | _2 words name_
18 | Material | 3 |
19 | Transform | 3 |
20 | BoneInfo | 2 |
21 | Model | **9** |
22 | ModelAnimation| 4 | _2 words name_
23 | Ray | 2 |
24 | RayCollision | 4 | _2 words name_
25 | BoundingBox | 2 | _2 words name_
26 | Wave | 5 |
27 | AudioStream | 4 | _2 words name_
28 | Sound | 2 |
29 | Music | 5 |
30 | VrDeviceInfo | **10** | _3 words name_
31 | VrStereoConfig | **8** | _3 words name_
01 | `Vector2` | 2 |
02 | `Vector3` | 3 |
03 | `Vector4` | 4 |
04 | `Matrix` | 4 |
05 | `Color` | 4 |
06 | `Rectangle` | 4 |
07 | `Image` | 5 |
08 | `Texture` | 5 |
09 | `RenderTexture` | 3 | _2 words name_
10 | `NPatchInfo` | 6 | _2 words name_
11 | `CharInfo` | 5 |
12 | `Font` | 6 |
13 | `Camera3D` | 5 |
14 | `Camera2D` | 4 |
15 | `Mesh` | **15** |
16 | `Shader` | 2 |
17 | `MaterialMap` | 3 | _2 words name_
18 | `Material` | 3 |
19 | `Transform` | 3 |
20 | `BoneInfo` | 2 |
21 | `Model` | **9** |
22 | `ModelAnimation`| 4 | _2 words name_
23 | `Ray` | 2 |
24 | `RayCollision` | 4 | _2 words name_
25 | `BoundingBox` | 2 | _2 words name_
26 | `Wave` | 5 |
27 | `AudioStream` | 4 | _2 words name_
28 | `Sound` | 2 |
29 | `Music` | 5 |
30 | `VrDeviceInfo` | **10** | _3 words name_
31 | `VrStereoConfig` | **8** | _3 words name_
## Enumerations
## Enumerations
@ -293,27 +293,29 @@ Personally, I tried to avoid enum values requirement as much as possible within
count | enum name | values count | comments
count | enum name | values count | comments
:--:| :---------: | :-------: | :--------
:--:| :---------: | :-------: | :--------
01 | ConfigFlags | 14 |
02 | TraceLogLevel | 8 | _3 words name_
03 | KeyboardKey | **110** |
04 | MouseButton | 8 |
05 | MouseCursor | 11 |
06 | GamepadButton | **18** |
07 | GamepadAxis | 6 |
08 | MaterialMapIndex | 11 | _3 words name_
09 | ShaderLocationIndex | **26** | _3 words name_
10 | ShaderUniformDataType | 9 | **_4 words name_**
11 | PixelFormat | **21** |
12 | TextureFilter | 6 |
13 | TextureWrap | 4 |
14 | CubemapLayout | 6 |
15 | FontType | 3 |
16 | BlendMode | 6 |
17 | Gestures | 11 |
18 | CameraMode | 5 |
19 | CameraProjection | 2 |
20 | NPatchLayout | 3 | _3 words name_
01 | `ConfigFlags` | 14 |
02 | `TraceLogLevel` | 8 | _3 words name_
03 | `KeyboardKey` | **110** |
04 | `MouseButton` | 8 |
05 | `MouseCursor` | 11 |
06 | `GamepadButton` | **18** |
07 | `GamepadAxis` | 6 |
08 | `MaterialMapIndex` | 11 | _3 words name_
09 | `ShaderLocationIndex` | **26** | _3 words name_
10 | `ShaderUniformDataType` | 9 | **_4 words name_**
11 | `PixelFormat` | **21** |
12 | `TextureFilter` | 6 |
13 | `TextureWrap` | 4 |
14 | `CubemapLayout` | 6 |
15 | `FontType` | 3 |
16 | `BlendMode` | 6 |
17 | `Gesture`span> | 11 |
18 | `CameraMode` | 5 |
19 | `CameraProjection` | 2 |
20 | `NPatchLayout` | 3 | _3 words name_
## Conclusion
## Conclusion
One of the goals of raylib is being simple and easy-to-use and many hours have been put into the API design; thinking about the best name for every function, the minimum number of parameters required, the name of each parameter, the data types required... This syntax analysis is a good way to see what worked for this library and how it can be improved.
One of the goals of raylib is being simple and easy-to-use and many hours have been put into the API design; thinking about the best name for every function, the minimum number of parameters required, the right name of each parameter, the data types structure and more.
I think this syntax analysis is useful to see what worked for raylib library and also help to improved it.