OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
ias_math_compute_3dvec_dot.c
Go to the documentation of this file.
1 /*******************************************************************************
2 NAME: ias_math_compute_3dvec_dot
3 
4 PURPOSE:
5 Multiply two vectors of type IAS_VECTOR (Dot product)
6 
7 RETURN VALUE:
8 Type = double
9 Value of computed dot product
10 
11 *******************************************************************************/
12 #include "ias_math.h"
13 
15 (
16  const IAS_VECTOR *vec1, /* I: Vector one to be multiplied */
17  const IAS_VECTOR *vec2 /* I: Vector two to be multiplied */
18 )
19 {
20  double dot_product;
21 
22  dot_product = vec1->x * vec2->x + vec1->y * vec2->y + vec1->z * vec2->z;
23 
24  return dot_product;
25 }
double ias_math_compute_3dvec_dot(const IAS_VECTOR *vec1, const IAS_VECTOR *vec2)