Translate C expression to Java expression



Hi,
I'm attempting to translate a C function to a Java method,
but I'm stuck on the two non-trivial return expressions shown below.
Hoping someone here can help.
Thanks,
Jeff Higgins

int test(double* xy1, double* xy2, double* xy3)
{
if (fabs(vectmult(xy1, xy2, xy3)) != 0.0)
return 0;
if (xy1[0] != xy2[0])
return (xy3[0] - xy2[0]) * (xy2[0] - xy1[0]) < 0.0;
if (xy1[1] != xy2[1])
return (xy3[1] - xy2[1]) * (xy2[1] - xy1[1]) < 0.0;
return 1;
}


.



Relevant Pages

  • are all expressions an expression?
    ... Only a small part of the queries were translated ... I am now busy to translate manually the queries to T-SQL and that ... are accepted in Access-ADO-mdb but not in Access-ADO-adp. ... expressions, e.g. their use in a WHERE clause: ...
    (microsoft.public.access.adp.sqlserver)
  • Re: need help of regular expression genius
    ... The first expressions says translate the semicolon to your split mark. ... LANGUAGE plpgsql; ... perform relname from pg_class ...
    (comp.lang.python)
  • Re: Parsing Logical Expressions
    ... translate the user level language to an execution level ... >any faster then just converting the expressions using ... >> translate one syntax to another without doing a complete ...
    (microsoft.public.access.modulesdaovba)
  • Re: Lets IGNORE Lymeraja
    ... > I think he ought to improve his English before he tries to get stuck ... Y thinc my Inglizh is quit goot, so Y whon't asc Frank two translate. ...
    (sci.med.diseases.lyme)
  • Re: quartic polynomial solver
    ... pov-ray source and translate their quartic ... solver to java. ... > I'm looking for a java method or Math lib which solves quartic ...
    (comp.lang.java.programmer)