<commit_before>/*
    Copyright (C) 2005 by <NAME>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __CS_ENGINETOOLS_H__
#define __CS_ENGINETOOLS_H__

/**\file
 * Helper functions for working on engine data.
 */

#include "csextern.h"

#include "csutil/set.h"
#include "csutil/array.h"

struct iSector;

class csVector3;

/**
 * Result structure for csEngineTools::FindShortestDistance().
 */
struct csShortestDistanceResult
{
  /**
   * Squared distance between the two points or negative if the distance
   * goes beyond the maximum radius.
   */
  float sqdistance;

  /**
   * This is a direction towards the destination point but corrected
   * with space warping portals. That means that if you go from the
   * start position in the direction returned here you will end up at
   * the destination point.
   */
  csVector3 direction;
};

/**
 * This is a class with static helper functions for working on engine
 * data.<commit_msg>Compile fix.<commit_after>/*
    Copyright (C) 2005 by <NAME>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __CS_ENGINETOOLS_H__
#define __CS_ENGINETOOLS_H__

/**\file
 * Helper functions for working on engine data.
 */

#include "csextern.h"

#include "csutil/set.h"
#include "csutil/array.h"
#include "csgeom/vector3.h"

struct iSector;

/**
 * Result structure for csEngineTools::FindShortestDistance().
 */
struct csShortestDistanceResult
{
  /**
   * Squared distance between the two points or negative if the distance
   * goes beyond the maximum radius.
   */
  float sqdistance;

  /**
   * This is a direction towards the destination point but corrected
   * with space warping portals. That means that if you go from the
   * start position in the direction returned here you will end up at
   * the destination point.
   */
  csVector3 direction;
};

/**
 * This is a class with static helper functions for working on engine
 * data.
{'fraction_non_alphanumeric': 0.06152433425160698, 'fraction_numerical': 0.009182736455463728, 'mean_word_length': 3.4523160762942777, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '6585058', 'n_tokens_mistral': 900, 'n_tokens_neox': 868, 'n_words': 436}