simplify mapping from normalized device coordinates
This commit is contained in:
@ -202,8 +202,7 @@ auto manual_transform(Edge2Set &result, const Edge3Set &edges,
|
||||
};
|
||||
|
||||
auto map = [&](const Vector2 &a) -> Vector2 {
|
||||
return Vector2((a.x + 1.0) / 2.0 * WIDTH,
|
||||
(1.0 - (a.y + 1.0)) / 2.0 * HEIGHT + HEIGHT / 2.0);
|
||||
return Vector2((1.0 + a.x) / 2.0 * WIDTH, (1.0 - a.y) * HEIGHT / 2.0);
|
||||
};
|
||||
|
||||
#ifdef PARALLEL_TRANSFORM
|
||||
|
||||
Reference in New Issue
Block a user