Skip to content

Commit

Permalink
Fix potential normalisation error
Browse files Browse the repository at this point in the history
  • Loading branch information
nmellado committed Dec 6, 2023
1 parent 81201d0 commit 664a440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drawingPasses/distanceField.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
struct DistanceField : public DrawingPass {
inline explicit DistanceField() : DrawingPass() {}
void render(const MyView::PointCollection& points, uint8_t*buffer, int w, int h) override{
double normFactor (std::max(w,h)/2);
double normFactor (std::max(w,h));
for (int j = 0; j < h; ++j ) {
for (int i = 0; i < w; ++i) {
auto *b = buffer + (i + j * w) * 4;
Expand Down

0 comments on commit 664a440

Please sign in to comment.