changed vector field slightly
This commit is contained in:
parent
30e130d123
commit
3b25635c19
2 changed files with 9 additions and 7 deletions
|
@ -56,8 +56,8 @@ void VectorField::Draw(SDL_Renderer* renderer, const SDL_Rect& targetRect)
|
|||
SDL_RenderDrawLineF(renderer,
|
||||
(double)targetRect.x + cellWidth * (x + 0.5),
|
||||
(double)targetRect.y + cellHeight * (y + 0.5),
|
||||
(double)targetRect.x + cellWidth * (x + 0.5) + horizontal[y * width + x] / biggestMagnitude * cellWidth,
|
||||
(double)targetRect.y + cellHeight * (y + 0.5) + vertical[y * width + x] / biggestMagnitude * cellHeight
|
||||
(double)targetRect.x + cellWidth * (x + 0.5) + horizontal[y * width + x] / biggestMagnitude * cellWidth * 2.5,
|
||||
(double)targetRect.y + cellHeight * (y + 0.5) + vertical[y * width + x] / biggestMagnitude * cellHeight * 2.5
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue