Skip to content

Commit

Permalink
Add more vector.negate() methods and bump-up the version
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdigest committed May 30, 2015
1 parent 11258a5 commit 33a5fa1
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.lwjgl</groupId>
<artifactId>joml</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
<name>JOML</name>
<description>Java-OpenGL-Math-Library</description>
<inceptionYear>2015</inceptionYear>
Expand Down
11 changes: 11 additions & 0 deletions src/com/joml/Vector2d.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,15 @@ public void readExternal(ObjectInput in) throws IOException,
y = in.readDouble();
}

/**
* Negate this vector.
*
* @return this
*/
public Vector2d negate() {
x = -x;
y = -y;
return this;
}

}
11 changes: 11 additions & 0 deletions src/com/joml/Vector2f.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,15 @@ public void readExternal(ObjectInput in) throws IOException,
y = in.readFloat();
}

/**
* Negate this vector.
*
* @return this
*/
public Vector2f negate() {
x = -x;
y = -y;
return this;
}

}
12 changes: 12 additions & 0 deletions src/com/joml/Vector3d.java
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,16 @@ public void readExternal(ObjectInput in) throws IOException,
z = in.readDouble();
}

/**
* Negate this vector.
*
* @return this
*/
public Vector3d negate() {
x = -x;
y = -y;
z = -z;
return this;
}

}
5 changes: 5 additions & 0 deletions src/com/joml/Vector3f.java
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@ public void readExternal(ObjectInput in) throws IOException,
z = in.readFloat();
}

/**
* Negate this vector.
*
* @return this
*/
public Vector3f negate() {
x = -x;
y = -y;
Expand Down

0 comments on commit 33a5fa1

Please sign in to comment.