Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICRE - ESP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ricardo Andres Ercoli Auersperg
ICRE - ESP
Commits
02c717b5
Commit
02c717b5
authored
2 years ago
by
RicardoEA
Browse files
Options
Downloads
Patches
Plain Diff
Corrijo implementación de funciones matemáticas
parent
4580534e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Robotito/src/math_vector_operations/math_vector_operations.c
+14
-8
14 additions, 8 deletions
Robotito/src/math_vector_operations/math_vector_operations.c
with
14 additions
and
8 deletions
Robotito/src/math_vector_operations/math_vector_operations.c
+
14
−
8
View file @
02c717b5
...
...
@@ -54,18 +54,24 @@ float dotProduct (sF3dVector_t* v, sF3dVector_t v2){
}
void
crossProduct
(
sF3dVector_t
*
v
,
sF3dVector_t
v2
){
v
->
x
=
v
->
y
*
v2
.
z
-
v
->
z
*
v2
.
y
;
v
->
y
=
v
->
z
*
v2
.
x
-
v
->
x
*
v2
.
z
;
v
->
z
=
v
->
x
*
v2
.
y
-
v
->
y
*
v2
.
x
;
float
vx
,
vy
,
vz
;
vx
=
v
->
x
;
vy
=
v
->
y
;
vz
=
v
->
z
;
v
->
x
=
vy
*
v2
.
z
-
vz
*
v2
.
y
;
v
->
y
=
vz
*
v2
.
x
-
vx
*
v2
.
z
;
v
->
z
=
vx
*
v2
.
y
-
vy
*
v2
.
x
;
}
void
vector_mul
(
sF3dMatrix_t
m
,
sF3dVector_t
*
v
){
v
->
x
=
m
.
x1
*
v
->
x
+
m
.
y1
*
v
->
y
+
m
.
z1
*
v
->
z
;
v
->
y
=
m
.
x2
*
v
->
x
+
m
.
y2
*
v
->
y
+
m
.
z2
*
v
->
z
;
v
->
z
=
m
.
x3
*
v
->
x
+
m
.
y3
*
v
->
y
+
m
.
z3
*
v
->
z
;
float
vx
,
vy
,
vz
;
vx
=
v
->
x
;
vy
=
v
->
y
;
vz
=
v
->
z
;
v
->
x
=
m
.
x1
*
vx
+
m
.
y1
*
vy
+
m
.
z1
*
vz
;
v
->
y
=
m
.
x2
*
vx
+
m
.
y2
*
vy
+
m
.
z2
*
vz
;
v
->
z
=
m
.
x3
*
vx
+
m
.
y3
*
vy
+
m
.
z3
*
vz
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment