Search:

Type: Posts; User: Slapy

Search: Search took 0.07 seconds.

  1. Replies
    13
    Views
    1,242

    Re: Problem with method

    So that if have to break for if there are same values as you can see in first one it's all ok but in another ones it just failed I don't know why.

    [-100.0, -100.0]; [-100.0, -100.0]
    0; 5
    true
    ...
  2. Replies
    13
    Views
    1,242

    Re: Problem with method

    Try to add this
    System.out.println(vertices[0] +"; "+ pol.getVertex(i)); before
    if (vertices[0].equals(pol.getVertex(i) ) ) break; and you will see it have to break that shitty for but it doesn't...
  3. Replies
    13
    Views
    1,242

    Re: Problem with method

    Sorry for duplicate I don't know how to delete it.
  4. Replies
    13
    Views
    1,242

    Re: Problem with method

    yes I am sure and like I said values of 4 digits: 0 5 5 5 have to be numbers of variable in array with match but it doesn't.

    --- Update ---

    It's just little bit different. First number have to...
  5. Replies
    13
    Views
    1,242

    Re: Problem with method

    it's value of int i but like I said output have to be 0 3 1 1 or 1 4 2 2 not 0 5 5 5 and there is no case when match is not found so I think it's not necessary to fix.

    Edit: so value of i have to...
  6. Replies
    13
    Views
    1,242

    Re: Problem with method

    basically I am comparing two instances of class Vertex 2D.


    int i = 0;

    for (; i < vertices.length; i++) {

    if (vertices[0].equals(pol.getVertex(i) ) ) break;
    }
  7. Replies
    13
    Views
    1,242

    Problem with method

    public abstract class SimplePolygon {

    public abstract Vertex2D getVertex(int index) throws IllegalArgumentException;
    public abstract int getNumVertices();

    public double getArea() {

    ...
Results 1 to 7 of 7