getChangQuIndex function
获取文昌文曲的索引(按时支)
- 辰上顺时文曲位
- 戌上逆时觅文昌
解释:
- 从辰顺数到时辰地支索引是文曲的索引
- 从戌逆数到时辰地支索引是文昌的索引
由于时辰地支的索引即是时辰的序号,所以可以直接使用时辰的序号
@param timeIndex 时辰索引【0~12】 @returns 文昌、文曲索引
Implementation
Map<String, int> getChangQuIndex(int timeIndex) {
final changIndex = fixIndex(
fixEarthlyBranchIndex(EarthlyBranchName.xuEarthly) - fixIndex(timeIndex),
);
final quIndex = fixIndex(
fixEarthlyBranchIndex(EarthlyBranchName.chenEarthly) + fixIndex(timeIndex),
);
return {"changIndex": changIndex, "quIndex": quIndex};
}