mirror of
https://github.com/bloeys/gglm.git
synced 2025-12-29 13:38:20 +00:00
Formatting
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# gglm
|
||||
|
||||
Fast OpenGL/Graphics focused Mathematics library in Go inspired by the c++ library [glm](https://github.com/g-truc/glm).
|
||||
Fast OpenGL/Graphics focused Mathematics library in Go inspired by the c++ library [glm](https://github.com/g-truc/glm).
|
||||
|
||||
gglm currently has the following:
|
||||
|
||||
@ -26,7 +26,7 @@ import "github.com/bloeys/gglm/gglm"
|
||||
|
||||
func main() {
|
||||
|
||||
//Vec2
|
||||
// Vec2
|
||||
v1 := &gglm.Vec2{Data: [2]float32{1, 2}}
|
||||
v2 := &gglm.Vec2{Data: [2]float32{3, 4}}
|
||||
println(gglm.DistVec2(v1, v2))
|
||||
@ -35,8 +35,8 @@ func main() {
|
||||
v2.Set(1, 2)
|
||||
println(v1.Eq(v2))
|
||||
|
||||
//This performs: v1 += v2
|
||||
//v1 is returned from the function, so we can chain calls that operate on v1
|
||||
// This performs: v1 += v2
|
||||
// v1 is returned from the function, so we can chain calls that operate on v1
|
||||
newX := v1.Add(v2).X()
|
||||
println("newX:", newX)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user