Advertisement
basilio_2004

vr_func.c

Mar 25th, 2015
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. // Copyright (C) 2015 - Home - Basileus
  2. // Date of creation: 23.03.2015 10:17:23
  3.  
  4. //Standart headers
  5. #include <math.h>
  6.  
  7.  
  8. int vr_func(int Width, int Length, double *inputAlpha, double *inputBeta, double *inputVel, double *outVel)
  9. {  
  10.     int i = 0,j = 0;
  11.     for(j=0; j<Length; j++)
  12.     {
  13.         for(i=0;i<Width;i++)
  14.         {
  15.             outVel[j*Width+i]=sin(inputAlpha[i]) * cos(inputBeta[j]) * inputVel[i] + cos(inputAlpha[i]) * cos(inputBeta[j]) * inputVel[Width+i] - sin(inputBeta[j]) * inputVel[2*Width+i];
  16.         }
  17.     }
  18.    
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement