Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rosjava Core Gradle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
CeTI
ROS
ROS Java Packages
Rosjava Core Gradle
Commits
7d075e6a
Commit
7d075e6a
authored
12 years ago
by
Damon Kohler
Browse files
Options
Downloads
Patches
Plain Diff
Pulls out constants for commonly used vectors.
parent
dcb0ed30
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
rosjava_geometry/src/main/java/org/ros/rosjava_geometry/Vector3.java
+9
-4
9 additions, 4 deletions
...metry/src/main/java/org/ros/rosjava_geometry/Vector3.java
with
9 additions
and
4 deletions
rosjava_geometry/src/main/java/org/ros/rosjava_geometry/Vector3.java
+
9
−
4
View file @
7d075e6a
...
...
@@ -28,6 +28,11 @@ import java.util.List;
*/
public
class
Vector3
{
private
static
final
Vector3
ZERO
=
new
Vector3
(
0
,
0
,
0
);
private
static
final
Vector3
X_AXIS
=
new
Vector3
(
1
,
0
,
0
);
private
static
final
Vector3
Y_AXIS
=
new
Vector3
(
0
,
1
,
0
);
private
static
final
Vector3
Z_AXIS
=
new
Vector3
(
0
,
0
,
1
);
private
final
double
x
;
private
final
double
y
;
private
final
double
z
;
...
...
@@ -41,19 +46,19 @@ public class Vector3 {
}
public
static
Vector3
zero
()
{
return
new
Vector3
(
0
,
0
,
0
)
;
return
ZERO
;
}
public
static
Vector3
xAxis
()
{
return
new
Vector3
(
1
,
0
,
0
)
;
return
X_AXIS
;
}
public
static
Vector3
yAxis
()
{
return
new
Vector3
(
0
,
1
,
0
)
;
return
Y_AXIS
;
}
public
static
Vector3
zAxis
()
{
return
new
Vector3
(
0
,
0
,
1
)
;
return
Z_AXIS
;
}
public
Vector3
(
double
x
,
double
y
,
double
z
)
{
...
...
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