Skip to main content
Code Review

Return to Answer

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

I think the code you posted (first version) is the most readable version of what you're trying to do, and that's really more important than getting your code smaller.

The only thing I would change is, as jmoreno suggested as jmoreno suggested, use a variable to hold the ticks and then add or subtract depending on the value of inverted. But I would keep the if blocks as you have them in the first version of your code.

I think the code you posted (first version) is the most readable version of what you're trying to do, and that's really more important than getting your code smaller.

The only thing I would change is, as jmoreno suggested, use a variable to hold the ticks and then add or subtract depending on the value of inverted. But I would keep the if blocks as you have them in the first version of your code.

I think the code you posted (first version) is the most readable version of what you're trying to do, and that's really more important than getting your code smaller.

The only thing I would change is, as jmoreno suggested, use a variable to hold the ticks and then add or subtract depending on the value of inverted. But I would keep the if blocks as you have them in the first version of your code.

added info
Source Link
seand
  • 2.5k
  • 1
  • 20
  • 29

I think the code you posted (first version) is the most readable version of what you're trying to do, and that's really more important than getting your code smaller.

The only thing I would change is, as jmoreno suggested , use a variable to hold the ticks and then add or subtract depending on the value of inverted. But I would keep the if blocks as you have them in the first version of your code.

I think the code you posted (first version) is the most readable version of what you're trying to do, and that's really more important than getting your code smaller.

I think the code you posted (first version) is the most readable version of what you're trying to do, and that's really more important than getting your code smaller.

The only thing I would change is, as jmoreno suggested , use a variable to hold the ticks and then add or subtract depending on the value of inverted. But I would keep the if blocks as you have them in the first version of your code.

Source Link
seand
  • 2.5k
  • 1
  • 20
  • 29

I think the code you posted (first version) is the most readable version of what you're trying to do, and that's really more important than getting your code smaller.

lang-c

AltStyle によって変換されたページ (->オリジナル) /