<commit_before>// -*- Mode:C++ -*-

/**************************************************************************************************/
/*                                                                                                */
/* Copyright (C) 2014-2015 University of Hull                                                     */
/*                                                                                                */
/**************************************************************************************************/
/*                                                                                                */
/*  module     :  glm/gtx/utilities.hpp                                                           */
/*  project    :                                                                                  */
/*  description:                                                                                  */
/*                                                                                                */
/**************************************************************************************************/

#if !defined(UKACHULLDCS_08961_GLM_GTX_UTILITIES_HPP)

#define UKACHULLDCS_08961_GLM_GTX_UTILITIES_HPP

// includes, system

#include <glm/glm.hpp> // glm::mat4, glm::vec3

// includes, project

#include <glm/export.h>

namespace glm {
  
  // types, exported (class, enum, struct, union, typedef)

  struct DCS08961_GLM_EXPORT decompose {
        
  public:

    enum order { rst, rts, srt, str, trs, tsr, };
    
    mat4 rotation;
    mat4 scale;
    mat4 translation;
    
    explicit decompose(mat4 const&);
    
  };
  
  // variables, exported (extern)

  namespace convert {

    /**
     * \brief transformtion to be left multiplied to an opengl projection matrix for in a
     *        d3d11 pipeline
     */
    extern DCS08961_GLM_EXPORT mat4 const opengl_to_d3d;

    /**
     * \brief glm::inverse(opengl_to_d3d); \see opengl_to_d3d
     */
    extern DCS08961_GLM_EXPORT mat4 const d3d_to_opengl;
    
  } // namespace convert {
  
  // functions, inlined (inline)  
  
#if !defined(_MSC_VER) || (defined(_MSC_VER) && (_MSC_VER > 1800))
  /**
   * \brief user-defined literals for distinguishing degrees and radians
   *
   * float const a1(90_deg);                  // 90 degree in radians
   * float const a2(glm::pi<float>() / 4.0);  // 90 degree in radians
   */
  //@{
  constexpr double operator "" _deg(unsigned long long);
  constexpr double operator "" _deg(long double);
  constexpr double operator "" _rad(unsigned long long);
  constexpr double operator "" _rad(long double);
  //@}
#else
#  pragma message("Note: user-defined string literal operators not supported ")
#  pragma message("      using (unreliable) macro workaround for _deg/_rad")
#endif // !defined(_MSC_VER) || (defined(_MSC_VER) && (_MSC_VER > 1800))

  /**
   * \brief compute T - floor(T / (2 * pi) * (2 * pi)
   *
   * \param  T
   *
   * \return rev(T)
   */
  template <typename T> T rev(T);
  
  /**
   * \brief compute the signum of T
   *
   * \param  T
   *
   * \return signum(T)
   */
  template <typename T> signed sgn(T);
  
  // functions, exported (extern)

  namespace convert {
    
    /**<commit_msg>cleanup: commentary<commit_after>// -*- Mode:C++ -*-

/**************************************************************************************************/
/*                                                                                                */
/* Copyright (C) 2014-2015 University of Hull                                                     */
/*                                                                                                */
/**************************************************************************************************/
/*                                                                                                */
/*  module     :  glm/gtx/utilities.hpp                                                           */
/*  project    :                                                                                  */
/*  description:                                                                                  */
/*                                                                                                */
/**************************************************************************************************/

#if !defined(UKACHULLDCS_08961_GLM_GTX_UTILITIES_HPP)

#define UKACHULLDCS_08961_GLM_GTX_UTILITIES_HPP

// includes, system

#include <glm/glm.hpp> // glm::*

// includes, project

#include <glm/export.h>

namespace glm {
  
  // types, exported (class, enum, struct, union, typedef)

  struct DCS08961_GLM_EXPORT decompose {
        
  public:

    enum order { rst, rts, srt, str, trs, tsr, };
    
    mat4 rotation;
    mat4 scale;
    mat4 translation;
    
    explicit decompose(mat4 const&);
    
  };
  
  // variables, exported (extern)

  namespace convert {

    /**
     * \brief transformtion to be left multiplied to an opengl projection matrix for use in a
     *        D3D11 pipeline
     */
    extern DCS08961_GLM_EXPORT mat4 const opengl_to_d3d;

    /**
     * \brief glm::inverse(opengl_to_d3d); \see opengl_to_d3d
     */
    extern DCS08961_GLM_EXPORT mat4 const d3d_to_opengl;
    
  } // namespace convert {
  
  // functions, inlined (inline)  
  
#if !defined(_MSC_VER) || (defined(_MSC_VER) && (_MSC_VER > 1800))
  /**
   * \brief user-defined literals for distinguishing degrees and radians
   *
   * float const a1(90_deg);                  // 90 degree in radians
   * float const a2(glm::pi<float>() / 4.0);  // 90 degree in radians
   */
  //@{
  constexpr double operator "" _deg(unsigned long long);
  constexpr double operator "" _deg(long double);
  constexpr double operator "" _rad(unsigned long long);
  constexpr double operator "" _rad(long double);
  //@}
#else
#  pragma message("Note: user-defined string literal operators not supported ")
#  pragma message("      using (unreliable) macro workaround for _deg/_rad")
#endif // !defined(_MSC_VER) || (defined(_MSC_VER) && (_MSC_VER > 1800))

  /**
   * \brief convert the input angle (in radians) to be between [0, 2*pi]
   *
   * \param  T
   *
   * \return T -> [0, 2*pi]
   */
  template <typename T> T rev(T);
  
  /**
   * \brief compute the sign[um] of T
   *
   * \param  T
   *
   * \return sign(T) + identity(T)
   */
  template <typename T> signed sgn(T);
  
  // functions, exported (extern)

  namespace convert {
    
    /**
{'fraction_non_alphanumeric': 0.18802376961755296, 'fraction_numerical': 0.020722230687185737, 'mean_word_length': 1.5005714285714287, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 52, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4194931', 'n_tokens_mistral': 1834, 'n_tokens_neox': 1668, 'n_words': 418}