Skip to content

Commit

Permalink
make all value_ptr const
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Dilly committed Mar 21, 2015
1 parent bbf8a07 commit b83a994
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gl3n/linalg.d
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct Vector(type, int dimension_) {
vt[dimension] vector; /// Holds all coordinates, length conforms dimension.

/// Returns a pointer to the coordinates.
@property auto value_ptr() { return vector.ptr; }
@property auto value_ptr() const { return vector.ptr; }

/// Returns the current vector formatted as string, useful for printing the vector.
@property string as_string() {
Expand Down Expand Up @@ -1904,7 +1904,7 @@ struct Quaternion(type) {
qt[4] quaternion; /// Holds the w, x, y and z coordinates.

/// Returns a pointer to the quaternion in memory, it starts with the w coordinate.
@property auto value_ptr() { return quaternion.ptr; }
@property auto value_ptr() const { return quaternion.ptr; }

/// Returns the current vector formatted as string, useful for printing the quaternion.
@property string as_string() {
Expand Down

0 comments on commit b83a994

Please sign in to comment.