Skip to content

M_PI is undefined. #392

@eyal0

Description

@eyal0

This fix got lost in the shuffle.

M_PI is a non-standard constant that is sometimes defined in math.h. Let's define it as needed because it isn't standard and standard compilers are failing to compile gerbv when this is in use.

https://github.com/gerbv/gerbv/pull/368/changes#diff-3802cbcdb0af8c0a04ec0fc67cab4d18dbed5f686c2b6cad1d836323c0b64bbdR81-R90

#ifndef M_PI
# define M_PI		3.14159265358979323846	/* pi */
#endif
#ifndef M_PI_2
# define M_PI_2		1.57079632679489661923	/* pi/2 */
#endif
#ifndef M_1_PI
# define M_1_PI		0.31830988618379067154	/* 1/pi */
#endif

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