Description
Return forward, backward and shortest distances on a twelve-position zodiac cycle.
A cyclic index repeats after a fixed number of positions, so forward and backward distances can differ even when they connect the same endpoints. A zodiac-position convention supplies an ordering; converting dates to zodiac years requires a separate calendar rule.
Return forward, backward and shortest distances on a twelve-position zodiac cycle.
When to use this tool
Use Chinese Animal-Cycle Distance Calculator when comparing two positions under the supplied twelve-position ordering.
How to use the tool and how it works
- Enter fromAnimalIndex, toAnimalIndex. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Return forward, backward and shortest distances on a twelve-position zodiac cycle. Require animal indexes 0..11; forward/backward are opposite nonnegative modulo-12 differences and shortest is their minimum.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| fromAnimalIndex | Index 0..11 under the caller's consistent zodiac-animal ordering. | Required. Safe integer. Calculation range: 0 through 11, inclusive. |
| toAnimalIndex | To Animal Index | Required. Safe integer. Calculation range: 0 through 11, inclusive. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned calculated value or nested object under the stated output convention. | Required. Object. |
| result.forward | Forward | Calculated result member: number. |
| result.backward | Backward | Calculated result member: number. |
| result.shortest | Shortest | Calculated result member: number. |
{
"input": {
"fromAnimalIndex": 11,
"toAnimalIndex": 0
},
"output": {
"result": {
"forward": 1,
"backward": 11,
"shortest": 1
}
}
} Limitations and assumptions
- The caller supplies a consistent animal-index ordering; no date, lunar year or zodiac assignment is calculated.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a calendar-aware date conversion and the intended zodiac-year convention for actual birth-date or year assignments.
References
Similar or alternative tools
- arithmetic/modulo
Calculate a normalized nonnegative modulo result.
- Chinese Zodiac Sign Lookup
Chinese12yearanimalcyclefromactualindependently alreadyassignedLUNARcalendarYEAR,NOTGregorianbirthyearnearnewyear boundary;not personality. Bounded offline explicitly declared convention;not personalidentity/traitinference,prediction,secure randomness or guaranteedgameresult.