I believe that is there just for balance in that function.
TerrainX has X and TerrainZ has Z.
Probably all 3 use the same C code only returning a different paramater.
TerrainX has X and TerrainZ has Z.
Probably all 3 use the same C code only returning a different paramater.