<commit_before><commit_msg>`Tilemaps.Components.GetWorldToTileYFunction` is a new function that returns the correct type of translation to use.<commit_after>/**
 * @author       <NAME> <<EMAIL>>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */

var CONST = require('../const');
var HexagonalWorldToTileY = require('./HexagonalWorldToTileY');
var NOOP = require('../../utils/NOOP');
var StaggeredWorldToTileY = require('./StaggeredWorldToTileY');
var WorldToTileY = require('./WorldToTileY');

/**
 * Gets the correct function to use to translate tiles, based on the map orientation.
 *
 * @function Phaser.Tilemaps.Components.GetWorldToTileYFunction
 * @since 3.50.0
 *
 * @param {number} orientation - The Tilemap orientation constant.
 *
 * @return {(Phaser.Tilemaps.Components.WorldToTileY|Phaser.Tilemaps.Components.HexagonalWorldToTileY|Phaser.Tilemaps.Components.StaggeredWorldToTileY)} The function to use to translate tiles for the given map type.
 */
var GetWorldToTileYFunction = function (orientation)
{
    if (orientation === CONST.ORTHOGONAL)
    {
        return WorldToTileY;
    }
    else if (orientation === CONST.HEXAGONAL)
    {
        return HexagonalWorldToTileY;
    }
    else if (orientation === CONST.STAGGERED)
    {
        return StaggeredWorldToTileY;
    }
    else
    {
        return NOOP;
    }
};

module.exports = GetWorldToTileYFunction;

{'fraction_non_alphanumeric': 0.11618257261410789, 'fraction_numerical': 0.005532503457814661, 'mean_word_length': 3.7755775577557755, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5319542', 'n_tokens_mistral': 449, 'n_tokens_neox': 436, 'n_words': 106}