Attention is currently required from: laforge, dexter. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30933 )
Change subject: uitils: add floored and euclidian modulo functions ......................................................................
Patch Set 4:
(5 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/8a2bf48e_d52d762c PS4, Line 10: add a floored and an euclidian modulo function to be more complete. please name the place where / the reason why you would like to use these ideally with change-id reference to another patch
File include/osmocom/core/utils.h:
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/10122b9f_a937af90 PS4, Line 185: . would be very helpful to include a brief explanation, sort of like "A modulo where the result always has the sign of the divisor"
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/b2a0a2b3_52985edf PS4, Line 189: x you neet to put braces around every single occurence of these parameters like
(x) + (y)
It is also a good idea to not use names commonly used in C code, so rather X and Y.
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/44d5628f_d1fd143a PS4, Line 191: ) "A modulo where the result is always positive" or something
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/551df9c7_19a3e717 PS4, Line 195: y > 0 ? x % y + y : x % y - y please put braces around this section.
also braces around each (x) and (y)
also X and Y