-
Notifications
You must be signed in to change notification settings - Fork 370
Conversation
@@ -2,6 +2,21 @@ | |||
|
|||
import java.util.Arrays; | |||
|
|||
/** | |||
* Converts different between representations of trytes, bytes, trits and numbers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converts different between -> Converts between different
* <p> | ||
* This class also provides additional conversion tools: | ||
* <ul> | ||
* <li>Converting Trits to numerical values based on <i>Balance Ternary</i> arithmetic</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Balance Ternary -> Balanced ternary
|
||
/** | ||
* Creates a new trits array with the converted tryte string.<br> | ||
* should be used most for testing, as it allocates memory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be used most for testing, as it allocates memory
->
should be used mainly for testing as it allocates memory.
I would even go as far as: use only for testing as it allocates memory.
// Long <-> Trits | ||
|
||
/** | ||
* Parses the trits argument as a long value, based on <i>Balance Ternary</i> arithmetic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Balance Ternary -> Balanced ternary
} | ||
|
||
/** | ||
* fills a trit array with a representation of the {@code value} argument in <i>Balance Ternary</i> arithmetic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Balance Ternary -> Balanced ternary
|
||
/** | ||
* Converts trits array to bytes array based on {@link #NUMBER_OF_TRITS_IN_A_BYTE}.<br> | ||
* this method will over-ride the content of {@code dest} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
over-ride -> override :nerd_face
btw, @jakubcech - Github just added a cool feature to suggest changes: see the +- symbol (ctrl+g) https://blog.github.com/2018-10-16-future-of-software/#suggested-changes-public-beta |
Description
Code comments for the Converter.java class.
Fixes # 1117
Type of change
I haven't documented the
Pair<->Trits
methods. I don't see them in use either than testing and frankly didn't follow what each method does.Issues to open:
pos
&offset
are used interchangeably