- Removed -fwritable-string

SKIPPED:
	psi/dornier2.c
	psi/ecbdriv.c
	psi/el734hp.c
	psi/libpsi.a
	psi/make_gen
	psi/makefile_linux
	psi/pimotor.c
	psi/pipiezo.c
	psi/sinqhttp.c
	psi/tcpdornier.c
	psi/velodornier.c
This commit is contained in:
koennecke
2006-03-31 15:24:52 +00:00
parent 4081448055
commit 51a60375d6
38 changed files with 1232 additions and 154 deletions

View File

@ -12,6 +12,8 @@
#include <assert.h>
#include <math.h>
#include "vector.h"
#include "trigd.h"
/*----------------------------------------------------------------------*/
MATRIX makeVector(){
return mat_creat(3,1,ZERO_MATRIX);
@ -143,3 +145,26 @@ MATRIX matFromTwoVectors(MATRIX v1, MATRIX v2){
killVector(a3);
return result;
}
/*-----------------------------------------------------------------------*/
double angleBetween(MATRIX v1, MATRIX v2){
double angle, angles;
MATRIX v3 = NULL;
angle = vectorDotProduct(v1,v2)/(vectorLength(v1) * vectorLength(v2));
v3 = vectorCrossProduct(v1,v2);
if(v3 != NULL){
angles = vectorLength(v3)/(vectorLength(v1) * vectorLength(v2));
angle = Atan2d(angles,angle);
} else {
angle = Acosd(angle);
}
return angle;
}
/*----------------------------------------------------------------------*/
void scaleVector(MATRIX v, double scale){
int i;
for(i = 0; i < 3; i++){
v[i][0] *= scale;
}
}