We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In line 98 of file DGtal/shapes/parametric/NGon2D.ih, the variable angle uses itself in its definition
const double angle = t - myPhi + (angle < 0.0 ? NGON2D_2_PI : 0.);
I suggest to rewrite as
double angle = t - myPhi; angle = (angle < 0.0) ? angle + NGON2D_2_PI : angle;
A consequence of this error can be materialized by digitizing a triangle
#include <DGtal/helpers/StdDefs.h> #include <DGtal/io/boards/Board2D.h> #include <DGtal/shapes/GaussDigitizer.h> #include <DGtal/shapes/Shapes.h> #include <DGtal/shapes/parametric/NGon2D.h> int main(int argc, char* argv[]) { using namespace DGtal::Z2i; typedef DGtal::NGon2D<Space> Shape; double PI = 3.14159265359; Shape shape(0,0,20,3,PI/2); DGtal::GaussDigitizer<Space, Shape> gd; double h =0.5; gd.attach(shape); gd.init(shape.getLowerBound(), shape.getUpperBound(), h); Domain domain(gd.getDomain().lowerBound(), gd.getDomain().upperBound()); DigitalSet output(domain); DGtal::Shapes<Domain>::digitalShaper(output, gd); DGtal::Board2D board; board << output; board.saveSVG("triangle.svg"); return 0; }
The text was updated successfully, but these errors were encountered:
Fixed in #1541
Sorry, something went wrong.
No branches or pull requests
In line 98 of file DGtal/shapes/parametric/NGon2D.ih, the variable angle uses itself in its definition
I suggest to rewrite as
A consequence of this error can be materialized by digitizing a triangle
The text was updated successfully, but these errors were encountered: