On 01/13/2017 07:20 PM, Ignacious wrote:
When doing common functionality for a switch, is there any way to optimize:
switch(x)
{
case X:
q.X = e;
break;
case Y:
q.Y = e;
break
etc...
}
e is basically a value that, depending on the what kind(x), we
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 &one, GameObject &two) //
AABB - Circle collision
{
// Get center point circle first
glm::vec
On Saturday, 14 January 2017 at 03:20:24 UTC, Ignacious wrote:
When doing common functionality for a switch, is there any way
to optimize:
switch(x)
{
case X:
q.X = e;
break;
case Y:
q.Y = e;
break
etc...
}
e is basically a value that, depending
When doing common functionality for a switch, is there any way to
optimize:
switch(x)
{
case X:
q.X = e;
break;
case Y:
q.Y = e;
break
etc...
}
e is basically a value that, depending on the what kind(x), we
assign it to a field in q. The name of
On 01/13/2017 04:29 PM, Dave Chapman wrote:
> When I use auto and print out the type of b it is something like
> args.main.FilterResult!(__lambda2, DirIterator).FilterResult and for the
> "if" version of
> b and args.main.FilterResult!(__lambda3, DirIterator).FilterResult for
> the "else" versio
I would like to do something like the code shown below but I
can't figure out how to do
it without loops inside the if statement.
When I use auto and print out the type of b it is something like
args.main.FilterResult!(__lambda2, DirIterator).FilterResult and
for the "if" version of
b and args.
On Friday, 13 January 2017 at 19:47:38 UTC, aberba wrote:
awesome. roundRobin? :)
https://dlang.org/phobos/std_range.html#.roundRobin
[quote]
roundRobin(r1, r2, r3) yields r1.front, then r2.front, then
r3.front, after which it pops off one element from each and
continues again from r1. For e
On Friday, 13 January 2017 at 12:00:41 UTC, ZombineDev wrote:
On Friday, 13 January 2017 at 06:32:02 UTC, aberba wrote:
Unlike array1 + array2, how can i merge arrays such that:
[a1, a1, a2, a1, a1, a2, a1] //uniform order
where a1 = child of array1,
a2 = child of array2
using a built-in func
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 s
I'm converting some C++ and glm code to D and gl3n. And I'm
stumped at the following line.
GLboolean CheckCollision(BallObject &one, GameObject &two) //
AABB - Circle collision
{
// Get center point circle first
glm::vec2 center(one.Position + one.Radius);
. . .
}
one.Position i
On Friday, 13 January 2017 at 06:32:02 UTC, aberba wrote:
Unlike array1 + array2, how can i merge arrays such that:
[a1, a1, a2, a1, a1, a2, a1] //uniform order
where a1 = child of array1,
a2 = child of array2
using a built-in function/algorithm (is/are there anything(s)
in Phobos for this?).
11 matches
Mail list logo