Skip to content

Commit

Permalink
Make vectors, particle, aaabb into structs for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoxdd committed Jun 19, 2018
1 parent a513b08 commit 5b003b1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/aabb.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AABB(V)
struct AABB(V)
getter minimum_point
getter maximum_point

Expand Down
2 changes: 1 addition & 1 deletion src/particle.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Particle(V)
struct Particle(V)
getter center
getter radius

Expand Down
2 changes: 1 addition & 1 deletion src/vector2.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "math"
require "./vector"

class Vector2
struct Vector2
include Vector(self)

def initialize(@x = 0.0, @y = 0.0)
Expand Down
2 changes: 1 addition & 1 deletion src/vector3.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "math"
require "./vector"

class Vector3
struct Vector3
include Vector(self)

def initialize(@x = 0.0, @y = 0.0, @z = 0.0)
Expand Down

0 comments on commit 5b003b1

Please sign in to comment.