Skip to content

Commit 53be4c1

Browse files
committed
Updated Readme and version number
1 parent a154d05 commit 53be4c1

File tree

2 files changed

+59
-59
lines changed

2 files changed

+59
-59
lines changed

Readme.md

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -17,47 +17,47 @@ All operations in VecMatLib are designed to **not** modify the object on which t
1717
Scala example:
1818

1919
```scala
20-
var a = Vec3f(1.0f, 1.0f, 1.0f)
21-
var b = Vec3f(0.5f, 0.5f, 0.5f)
20+
var a = Vec3f(1.0f, 1.0f, 1.0f)
21+
var b = Vec3f(0.5f, 0.5f, 0.5f)
2222

23-
// 'a' and 'b' will not change
24-
val c = a + b
23+
// 'a' and 'b' will not change
24+
val c = a + b
2525

26-
// Increase 'a' by 'b'
27-
a = a + b
26+
// Increase 'a' by 'b'
27+
a = a + b
2828
```
2929

3030
Java example:
3131

3232
```java
33-
Vec3f a = new Vec3f(1.0f, 1.0f, 1.0f);
34-
Vec3f b = new Vec3f(0.5f, 0.5f, 0.5f);
33+
Vec3f a = new Vec3f(1.0f, 1.0f, 1.0f);
34+
Vec3f b = new Vec3f(0.5f, 0.5f, 0.5f);
3535

36-
// 'a' and 'b' will not change
37-
Vec3f c = a.plus(b);
36+
// 'a' and 'b' will not change
37+
Vec3f c = a.plus(b);
3838

39-
// Increase 'a' by 'b'
40-
a = a.plus(b);
39+
// Increase 'a' by 'b'
40+
a = a.plus(b);
4141
```
4242

4343
The Vector API offers integer, single-precision and double-precision vectors with all their basic operations.
4444

4545
```scala
46-
var a = Vec3f(1.0f, 1.0f, 1.0f)
47-
var b = Vec3f(0.5f, 0.5f, 0.5f)
46+
val a = Vec3f(1.0f, 1.0f, 1.0f)
47+
val b = Vec3f(0.5f, 0.5f, 0.5f)
4848

49-
var dotProduct = a dot b
50-
var normal = a.normalized
51-
var reflection = b.reflect(normal)
49+
val dotProduct = a dot b
50+
val normal = a.normalized
51+
val reflection = b.reflect(normal)
5252
```
5353

5454
```java
55-
Vec3f a = new Vec3f(1.0f, 1.0f, 1.0f);
56-
Vec3f b = new Vec3f(0.5f, 0.5f, 0.5f);
55+
Vec3f a = new Vec3f(1.0f, 1.0f, 1.0f);
56+
Vec3f b = new Vec3f(0.5f, 0.5f, 0.5f);
5757

58-
float dotProduct = a.dot(b);
59-
Vec3d normal = a.normalized();
60-
Vec3d reflection = b.reflect(normal);
58+
float dotProduct = a.dot(b);
59+
Vec3f normal = a.normalized();
60+
Vec3f reflection = b.reflect(normal);
6161
```
6262

6363
## Matrix API
@@ -66,79 +66,79 @@ With VecMatLib you can create matrices for geometric transformations such as tra
6666
None of these operations modify the matrix on which they are called.
6767

6868
```scala
69-
var position = Vec4f(x, y, z, 1.0f)
70-
val translation = Mat4f.translation(tx, ty, tz)
69+
var position = Vec4f(x, y, z, 1.0f)
70+
val translation = Mat4f.translation(tx, ty, tz)
7171

72-
// will result in (x + tx, y + ty, z + tz, 1.0f)
73-
position = translation * position
72+
// will result in (x + tx, y + ty, z + tz, 1.0f)
73+
position = translation * position
7474
```
7575

7676
```java
77-
Vec4f position = new Vec4f(x, y, z, 1.0f);
78-
Mat4f translation = Mat4f.translation(tx, ty, tz);
77+
Vec4f position = new Vec4f(x, y, z, 1.0f);
78+
Mat4f translation = Mat4f.translation(tx, ty, tz);
7979

80-
// will result in (x + tx, y + ty, z + tz, 1.0f)
81-
position = translation.multiply(position);
80+
// will result in (x + tx, y + ty, z + tz, 1.0f)
81+
position = translation.multiply(position);
8282
```
8383

84-
## Using with [LWJGL](https://lwjgl.org)
84+
## Using with LWJGL
8585

86-
VecMatLib can be used together with LWJGL to set uniform variables in shaders.
86+
VecMatLib can be used together with [LWJGL](https://lwjgl.org) to set uniform variables in shaders.
8787

8888
```java
89-
Vec3f lightPosition = new Vec3f(-3.0f, 10.0f, 6.0f);
90-
int location = GL20.glGetUniformLocation(program, "light_position");
91-
GL20.glUniform3f(location, lightPosition.x(), lightPosition.y(), lightPosition.z());
89+
Vec3f lightPosition = new Vec3f(-3.0f, 10.0f, 6.0f);
90+
int location = GL20.glGetUniformLocation(program, "light_position");
91+
GL20.glUniform3f(location, lightPosition.x(), lightPosition.y(), lightPosition.z());
9292
```
9393

9494
## Add VecMatLib to your project
9595

96-
VecMatLib can be added to any Java or Scala project as a dependency using Jitpack.
96+
VecMatLib can be added to any Java or Scala project as a dependency using [Jitpack](https://jitpack.io/).
9797

9898
### Gradle
9999

100100
```groovy
101-
allprojects {
102-
repositories {
103-
...
104-
maven { url 'https://jitpack.io' }
105-
}
106-
}
101+
allprojects {
102+
repositories {
103+
...
104+
maven { url 'https://jitpack.io' }
105+
}
106+
}
107107
```
108108

109109
```groovy
110-
dependencies {
111-
implementation 'com.github.HexagonNico:VecMatLib:0.1'
112-
}
110+
dependencies {
111+
implementation 'com.github.HexagonNico:VecMatLib:0.2'
112+
}
113113
```
114114

115115
### Maven
116116

117117
```xml
118-
<repositories>
119-
<repository>
120-
<id>jitpack.io</id>
121-
<url>https://jitpack.io</url>
122-
</repository>
123-
</repositories>
118+
<repositories>
119+
<repository>
120+
<id>jitpack.io</id>
121+
<url>https://jitpack.io</url>
122+
</repository>
123+
</repositories>
124124
```
125125

126126
```xml
127-
<dependency>
128-
<groupId>com.github.HexagonNico</groupId>
129-
<artifactId>VecMatLib</artifactId>
130-
<version>0.1</version>
131-
</dependency>
127+
<dependency>
128+
<groupId>com.github.HexagonNico</groupId>
129+
<artifactId>VecMatLib</artifactId>
130+
<version>0.2</version>
131+
</dependency>
132132
```
133133

134134
### SBT
135135

136136
```sbt
137-
resolvers += "jitpack" at "https://jitpack.io"
137+
resolvers += "jitpack" at "https://jitpack.io"
138138
```
139139

140140
```sbt
141-
libraryDependencies += "com.github.HexagonNico" % "VecMatLib" % "0.1"
141+
libraryDependencies += "com.github.HexagonNico" % "VecMatLib" % "0.2"
142142
```
143143

144144
## Support the project

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ThisBuild / version := "0.1"
1+
ThisBuild / version := "0.2"
22

33
ThisBuild / scalaVersion := "2.13.10"
44

0 commit comments

Comments
 (0)