RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sincsqrd.cpp
Go to the documentation of this file.
1 //
2 // File = sincsqrd.cpp
3 //
4 
5 #include "sincsqrd.h"
6 #include <math.h>
7 #include <stdlib.h>
8 
9 double
10 sinc_sqrd(double x)
11 {
12  double result;
13  if (x == 0.0) {
14  result = 1.0;
15  } else {
16  result = sin(x) / x;
17  result = result * result;
18  }
19  return (result);
20 }
21 
22 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
double sinc_sqrd(double x)
Definition: sincsqrd.cpp:10