M
michael.goossens
BBox::Expand(float delta){
Vector d = Vector(delta, delta, delta);
p_min -= d;
p_max += d;
}
BBox::Expand(float delta){
p_min -= Vector(delta, delta, delta);
p_max += Vector(delta, delta, delta);
}
Logically the first method would only make 1 Vector object and the
second 2, so method two would take more cpu instructions? Or does c++
do some intern stuff to optimise this?
Vector d = Vector(delta, delta, delta);
p_min -= d;
p_max += d;
}
BBox::Expand(float delta){
p_min -= Vector(delta, delta, delta);
p_max += Vector(delta, delta, delta);
}
Logically the first method would only make 1 Vector object and the
second 2, so method two would take more cpu instructions? Or does c++
do some intern stuff to optimise this?