Dav1dde / gl3n

OpenGL Maths for D (not glm for D).
http://dav1dde.github.com/gl3n/
Other
103 stars 49 forks source link

add vector reflect method #56

Closed extrawurst closed 9 years ago

Dav1dde commented 9 years ago

This should be a function of math.d

extrawurst commented 9 years ago

i just figured it is the same level as distance, cross et. al which are right above my reflect inside of linalg.d ?!

extrawurst commented 9 years ago

@Dav1dde looking at math.d those methods there are very generic but imho reflect is very specific for vector types in its implementation so it belongs in linalg.d

Dav1dde commented 9 years ago

You are right, let me think about it. The idea was putting everything essential to matrices, vectors, quats in linalg.d (e.g. dot product is essential), reflect is more utility, I wanted to put utility into math.d (linalg then publically imports reflect). What do you think of this (current) approach?

extrawurst commented 9 years ago

@Dav1dde I am fine with that approach but I still think distance,cross etc. are misplaced then aswell. i would suggest to accept the PR and change all the methods to math.d then and add a public import.

Dav1dde commented 9 years ago

My bad, github doesn't let me merge from my phone...