4 ms·
Reminded me of http://www.eelis.net/C++/analogliterals.xhtml http://www.eelis.net/C++/analogliterals.xhtml, which starts with unsigned int a = 4; unsigned
by Someone 8y ago
Reminded me of http://www.eelis.net/C++/analogliterals.xhtml http://www.eelis.net/C++/analogliterals.xhtml, which starts with
unsigned int a = 4;
unsigned int b = I---------I;
assert( a == b );
Moves on to 2D:
unsigned int c = ( o-----o
| !
! !
! !
o-----o ).area;
assert( c == (I-----I) * (I-------I) );
and puts the cherry on the cake with 3D literals:
assert( top( o-------o
|L \
| L \
| o-------o
| ! !
! ! !
o | !
L | !
L| !
o-------o ) == ( o-------o
| !
! !
o-------o ) );