text: /*
   * Automatically Generated from Mathematica.
   * Fri 5 Nov 2021 09:03:13 GMT-04:00
   */
  #include <stdio.h>
  #include <stdlib.h>
  #include <math.h>
  
  #include "frost/gen/average_velocity.hh"
  
  #ifdef _MSC_VER
    #define INLINE __forceinline /* use __forceinline (VC++ specific) */
  #else
    #define INLINE inline        /* use standard inline */
  #endif
  
  /**
   * Copied from Wolfram Mathematica C Definitions file mdefs.hpp
   * Changed marcos to inline functions (Eric Cousineau)
   */
  INLINE double Power(double x, double y) { return pow(x, y); }
  INLINE double Sqrt(double x) { return sqrt(x); }
  
  INLINE double Abs(double x) { return fabs(x); }
  
  INLINE double Exp(double x) { return exp(x); }
  INLINE double Log(double x) { return log(x); }
  
  INLINE double Sin(double x) { return sin(x); }
  INLINE double Cos(double x) { return cos(x); }
  INLINE double Tan(double x) { return tan(x); }
  
  INLINE double ArcSin(double x) { return asin(x); }
  INLINE double ArcCos(double x) { return acos(x); }
  //INLINE double ArcTan(double x) { return atan(x); }
  
  /* update ArcTan function to use atan2 instead. */
  INLINE double ArcTan(double x, double y) { return atan2(y,x); }
  
  INLINE double Sinh(double x) { return sinh(x); }
  INLINE double Cosh(double x) { return cosh(x); }
  INLINE double Tanh(double x) { return tanh(x); }
  
  #define E 2.71828182845904523536029
  #define Pi 3.14159265358979323846264
  #define Degree 0.01745329251994329576924
  
  INLINE double Sec(double x) { return 1/cos(x); }
  INLINE double Csc(double x) { return 1/sin(x); }
  
  /*
   * Sub functions
   */
  static void output1(double *p_output1,const double *var1)
  {
    double t68;
    double t208;
    double t290;
    t68 = -1.*var1[0];
    t208 = t68 + var1[1];
    t290 = 1/t208;
    p_output1[0]=t290*(-1.*var1[2] + var1[22]);
    p_output1[1]=t290*(-1.*var1[3] + var1[23]);
  }
  
  
  
  void frost::gen::average_velocity(double *p_output1, const double *var1)
  {
    // Call Subroutines
    output1(p_output1, var1);
  
  }
  