-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
You should use enum (or at least #define) to name constants such as LEFT_LEGS, RIGHT_LEGS,... instead of using number like 0, 1 which decreases the code readability.
for example:
enum LegSides{
LEFT_LEGS = 0,
RIGHT_LEGS = 1
};or just forget the numbers:
enum LegSides{
LEFT_LEGS,
RIGHT_LEGS
};then the function:
double leg(double Z, double Y, double X2, int side) {...}will be:
double leg(double Z, double Y, double X2, LegSides side) {...}and call it:
leg(x, y, z, LEFT_LEGS);further here
mrbesen
Metadata
Metadata
Assignees
Labels
No labels