robin
02/08/2017, 8:45 AMcompanion object {
fun from(currentSegmentIndex: Index, otherSegmentIndex: Index): OtherSegmentRelationshipToCurrent {
return when (currentSegmentIndex - otherSegmentIndex) {
-1 -> otherIsLeftNeighborOfCurrent
0 -> otherIsCurrent
1 -> otherIsRightNeighborOfCurrent
else -> otherDoesNotTouchCurrent
}
}
}
the enum works.