mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-21 08:00:25 +00:00
imporved hyperpoint::operator[] const
This commit is contained in:
parent
033a9099d6
commit
f6448a994f
@ -114,7 +114,7 @@ struct hyperpoint : array<ld, MAXMDIM> {
|
|||||||
struct transmatrix {
|
struct transmatrix {
|
||||||
ld tab[MAXMDIM][MAXMDIM];
|
ld tab[MAXMDIM][MAXMDIM];
|
||||||
hyperpoint& operator [] (int i) { return (hyperpoint&)tab[i][0]; }
|
hyperpoint& operator [] (int i) { return (hyperpoint&)tab[i][0]; }
|
||||||
const ld * operator [] (int i) const { return tab[i]; }
|
const hyperpoint& operator [] (int i) const { return (const hyperpoint&)tab[i]; }
|
||||||
|
|
||||||
inline friend hyperpoint operator * (const transmatrix& T, const hyperpoint& H) {
|
inline friend hyperpoint operator * (const transmatrix& T, const hyperpoint& H) {
|
||||||
hyperpoint z;
|
hyperpoint z;
|
||||||
|
Loading…
Reference in New Issue
Block a user