From 5d4a70f81d1896ede119e0dfe42392c4506a2a34 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 15 Nov 2013 19:59:19 +0100 Subject: added comments --- calc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'calc.c') diff --git a/calc.c b/calc.c index 51ef6e2..4b5be28 100644 --- a/calc.c +++ b/calc.c @@ -2,8 +2,10 @@ #include "calc.h" #include "syscalls.h" +// table that holds precalculated values for the floor and ceiling int TDist[64]; +// random number generator; could be improved static uint lastrandom = 0x123456; void seedrandom(void) @@ -17,6 +19,7 @@ unsigned int random() return (lastrandom >> 16); } +// inits constants for floor etc void table() { int x; @@ -26,6 +29,7 @@ void table() } } +// fills an array void fill(uint *ptr, uint element, uint arraysize) { for(;arraysize > 0; arraysize--, ptr++) -- cgit v1.3.1