How can I make this statement readable?

Posted by bstullkid on Stack Overflow See other posts from Stack Overflow or by bstullkid
Published on 2010-06-09T21:09:24Z Indexed on 2010/06/09 21:12 UTC
Read the original article Hit count: 168

Filed under:

I'm having trouble coming up with a way to make this readable, any thoughts on how I should peice this together? Should I get rid of the one liner and use some ifs?

result = (
    strtod(
       strlen(v1->score) > 0 ? strtod(v1->score, (char **)NULL) < 0.1 ? "0.1" : v1->score : "0.0", (char**)NULL) >
    strtod(
       strlen(v2->score) > 0 ? strtod(v2->score, (char **)NULL) < 0.1 ? "0.1" : v2->score : "0.0", (char**)NULL)) ?
-1 : 1;

© Stack Overflow or respective owner

Related posts about c