diff options
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsVector.cs')
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsVector.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsVector.cs b/OpenSim/Region/Physics/Manager/PhysicsVector.cs index be82fca..1f5d0dc 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsVector.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsVector.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | 30 | ||
31 | |||
32 | namespace OpenSim.Region.Physics.Manager | 31 | namespace OpenSim.Region.Physics.Manager |
33 | { | 32 | { |
34 | public class PhysicsVector | 33 | public class PhysicsVector |
@@ -68,27 +67,27 @@ namespace OpenSim.Region.Physics.Manager | |||
68 | 67 | ||
69 | public static PhysicsVector cross(PhysicsVector a, PhysicsVector b) | 68 | public static PhysicsVector cross(PhysicsVector a, PhysicsVector b) |
70 | { | 69 | { |
71 | return new PhysicsVector(a.Y * b.Z - a.Z * b.Y, a.Z * b.X - a.X * b.Z, a.X * b.Y - a.Y * b.X); | 70 | return new PhysicsVector(a.Y*b.Z - a.Z*b.Y, a.Z*b.X - a.X*b.Z, a.X*b.Y - a.Y*b.X); |
72 | } | 71 | } |
73 | 72 | ||
74 | public float length() | 73 | public float length() |
75 | { | 74 | { |
76 | return (float)Math.Sqrt(X*X + Y*Y + Z*Z); | 75 | return (float) Math.Sqrt(X*X + Y*Y + Z*Z); |
77 | } | 76 | } |
78 | 77 | ||
79 | public static PhysicsVector operator / (PhysicsVector v, float f) | 78 | public static PhysicsVector operator /(PhysicsVector v, float f) |
80 | { | 79 | { |
81 | return new PhysicsVector(v.X / f, v.Y / f, v.Z / f); | 80 | return new PhysicsVector(v.X/f, v.Y/f, v.Z/f); |
82 | } | 81 | } |
83 | 82 | ||
84 | public static PhysicsVector operator *(PhysicsVector v, float f) | 83 | public static PhysicsVector operator *(PhysicsVector v, float f) |
85 | { | 84 | { |
86 | return new PhysicsVector(v.X * f, v.Y * f, v.Z * f); | 85 | return new PhysicsVector(v.X*f, v.Y*f, v.Z*f); |
87 | } | 86 | } |
88 | 87 | ||
89 | public static PhysicsVector operator *(float f, PhysicsVector v) | 88 | public static PhysicsVector operator *(float f, PhysicsVector v) |
90 | { | 89 | { |
91 | return v * f; | 90 | return v*f; |
92 | } | 91 | } |
93 | 92 | ||
94 | public virtual bool IsIdentical(PhysicsVector v, float tolerance) | 93 | public virtual bool IsIdentical(PhysicsVector v, float tolerance) |
@@ -101,4 +100,4 @@ namespace OpenSim.Region.Physics.Manager | |||
101 | return false; | 100 | return false; |
102 | } | 101 | } |
103 | } | 102 | } |
104 | } | 103 | } \ No newline at end of file |