From 3e7f475e58500fc51025c6ccbd521ad581687a9f Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 12 Aug 2014 21:08:01 +0100
Subject: fix the damm thing
---
OpenSim/Framework/Util.cs | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Framework/Util.cs')
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 1775fef..b8b78fa 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -58,6 +58,15 @@ namespace OpenSim.Framework
public enum PermissionMask : uint
{
None = 0,
+
+ // folded perms
+ foldedTransfer = 1,
+ foldedModify = 1 << 1,
+ foldedCopy = 1 << 2,
+
+ foldedMask = 0x07,
+
+ //
Transfer = 1 << 13,
Modify = 1 << 14,
Copy = 1 << 15,
@@ -243,14 +252,12 @@ namespace OpenSim.Framework
///
/// A 3d vector
/// A new vector which is normalized form of the vector
- /// The vector paramater cannot be <0,0,0>
+
public static Vector3 GetNormalizedVector(Vector3 a)
{
- if (IsZeroVector(a))
- throw new ArgumentException("Vector paramater cannot be a zero vector.");
-
- float Mag = (float) GetMagnitude(a);
- return new Vector3(a.X / Mag, a.Y / Mag, a.Z / Mag);
+ Vector3 v = new Vector3(a.X, a.Y, a.Z);
+ v.Normalize();
+ return v;
}
///
--
cgit v1.1