Skip to content

Commit adfa78c

Browse files
committed
array_length c macro
1 parent f1f0b2e commit adfa78c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

gamedev/graphics/raytracing.org

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
- Monte Carlo
2+
- https://www.youtube.com/watch?v=jRAMCzbXteA
3+
- https://www.youtube.com/watch?v=HG6c4Kwbv4I
4+
15
- https://cs87-dartmouth.github.io/Fall2024/
26
- playlist [[https://www.youtube.com/playlist?list=PLlrATfBNZ98edc5GshdBtREv5asFW3yXl][Ray Tracing]] by The Cherno
37
- The Timeless https://www.youtube.com/watch?v=T-9R0zAwL7s

languages/compiled/c/cpp.org

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ https://developers.redhat.com/articles/2025/01/30/how-implement-c23-embed-gcc-15
6565

6666
* Snippets
6767

68+
- array size
69+
#+begin_src c
70+
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof((array)[0]))
71+
#+end_src
6872
- add a new scope, if we have local variables on the macro. Use a DO-WHILE(0) to support inside an IF
6973
#+begin_src c
7074
#define SUM_RANGE(start, end) { \

0 commit comments

Comments
 (0)