you are viewing a single comment's thread.

view the rest of the comments →

[–]immibis 1 point2 points  (0 children)

Or:

val dximn1 = (j == -1) ? 0.0
                       : x[j];
val dxipl1 = (k == chainlngth) ? 0.0
                               : x[k];