Replies: 1 comment 10 replies
-
Adding a |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposal
We currently have an existing check if an
int
is a power of two. It uses a bitwise operation to do so:In my opinion this check is complex enough to become a method in a new utility class.
The logic is generic and is not coupled to any project.
It is exportable and reusable globally.
We have it already in a couple of places.
To Discuss
common
module?MathUtils
or create a classPreconditions
?Preconditions
, should we move also therequireNotBlank
method from the string utils there for consistency?@mattp-swirldslabs @AlfredoG87 @jsync-swirlds @georgi-l95 What do you guys think?
Beta Was this translation helpful? Give feedback.
All reactions