Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading code on src/matric.c (and exit matrix if out of memory)
Initially started due to warning about 'status set but not used'. Resolve matrix.c:compute_g() warning. Converted all references in matrix.c/h of using REAL with double. Insert print functions into debug wrappers, excluded if no debug. If alloc returns null due to lack of memory then begin reversing back by releasing used matrix memory (instead of segfaulting). There's a lot of asserts here! Did a closer look at some of them and also corrected a couple rows->to->cols. fill-matrix seemed a little non-symetric with some values returning 0.0 on L/R edges and values near zero (eg 10-E18) around top/bottoms, plus an odd reference to should this be epsilon, since the max matrix size is (25x2+1)x(25x2+1) decided to round any values less than 0.0001 to 0.0 to maintain a more consistent circular Top/Bottom_Left/Right symetry. Editted minimum matrix size to 1 since a matrix size of zero does not make sense to bother working with. Radius probably could have been changed to anything >= 0.5, but left this minimum unchanged.
- Loading branch information