Skip to content

Cast to double may be needed #4225

@scuniff

Description

@scuniff

double rx = width / 2;
double ry = shapeType == CIRCLE ? rx : height / 2;

Since width and height are ints, the equation is done with Integer accuracy and not Double accuracy.

To get Double accuracy from the equations, a double cast is needed

Maybe
double rx = (double) width / 2;
double ry = shapeType == CIRCLE ? rx : (double) height / 2;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions