Ignore:
Timestamp:
Sep 1, 2004, 2:31:48 AM (20 years ago)
Author:
ole
Message:

Added C-headers to share code
Removed length and distance from util

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/util_ext.c

    r240 r258  
    1414#include "math.h"
    1515
    16 
    17 int _gradient(double x0, double y0,
    18               double x1, double y1,
    19               double x2, double y2,
    20               double q0, double q1, double q2,
    21               double *a, double *b) {
    22 
    23   double det;
    24  
    25   det = (y2-y0)*(x1-x0) - (y1-y0)*(x2-x0);
    26 
    27   *a = (y2-y0)*(q1-q0) - (y1-y0)*(q2-q0);
    28   *a /= det;
    29 
    30   *b = (x1-x0)*(q2-q0) - (x2-x0)*(q1-q0);
    31   *b /= det;
    32 
    33   return 0;
    34 }
    35 
     16//Shared snippets
     17#include "util_ext.h"
    3618
    3719
Note: See TracChangeset for help on using the changeset viewer.