Re: Hopefully a simple question...

2017-01-13 Thread Nicholas Wilson via Digitalmars-d-learn
On Friday, 13 January 2017 at 16:56:43 UTC, WhatMeWorry wrote: I'm converting some C++ and glm code to D and gl3n. And I'm stumped at the following line. GLboolean CheckCollision(BallObject , GameObject ) // AABB - Circle collision { // Get center point circle first glm::vec2

Re: Hopefully a simple question...

2017-01-13 Thread kinke via Digitalmars-d-learn
On Friday, 13 January 2017 at 16:56:43 UTC, WhatMeWorry wrote: A vec and scalar can't be added together. So why (or how) is the glm code working? The C++ source disagrees: https://github.com/g-truc/glm/blob/master/glm/detail/type_vec2.hpp#L219 It works via operator overloading, and adding a