Ice Sheet System Model  4.18
Code documentation
Functions
cross.cpp File Reference

cross product for 2 vectors More...

#include "./types.h"

Go to the source code of this file.

Functions

void cross (IssmDouble *result, IssmDouble *vector1, IssmDouble *vector2)
 

Detailed Description

cross product for 2 vectors

Definition in file cross.cpp.

Function Documentation

◆ cross()

void cross ( IssmDouble result,
IssmDouble vector1,
IssmDouble vector2 
)

Definition at line 13 of file cross.cpp.

13  {
14 
15  /*result,vector1 and vector2 are all assumed to be of size 3: */
16 
17  result[0]=vector1[1]*vector2[2]-vector1[2]*vector2[1];
18  result[1]=vector1[2]*vector2[0]-vector1[0]*vector2[2];
19  result[2]=vector1[0]*vector2[1]-vector1[1]*vector2[0];
20 
21 }