Baret / pltcmd

Control military units only with your radio
MIT License
4 stars 0 forks source link

Use unit classes instead of primitives #120

Closed Loomie closed 2 years ago

Loomie commented 4 years ago

Description This comes from a review comment.

Most values have a specific unit in mind. For example val distance: Long stores the distance in meters or kilometers. But that is not expressed in the code. For easy recognition of what is meant and to extend specific use cases a named class should be used. Beside fields these new classes should also be used as return values and may improve local variable usage.

Implementation details Inline classes can be used to prevent un-/wrapping the values for all those data operations.

Baret commented 2 years ago

Duplicate of #146 and already resolved by PR #148