Skip to content

The M_PI macro is not part of the C / C ++ language standard. #31

@WojAbuk

Description

@WojAbuk
#ifndef M_PI
#define M_PI acos(-1)
#endif

The code snippet after #include <math.h> guarantees correct operation. It would be better to additionally check that we do not have a C ++ 20 or newer vessel and if we are to use the stencil constant from the C ++ standard library. The M_PI macro is an extension of the C standard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions