|
|
|
|
|
by GuB-42
1326 days ago
|
|
It is unfortunate that the language doesn't have a built-in "average between two ints" function. It is a common operation, people often get it wrong, as shown by this article, and it may have a really simple and correct assembly representation that the compiler may take advantage of. Such a function, even if it seems trivial, has some educative value as it opens an opportunity to explain the problem in the documentation. |
|