fix the damm thing

avinationmerge
UbitUmarov 2014-08-12 21:08:01 +01:00
parent bf269c871a
commit 3e7f475e58
1 changed files with 13 additions and 6 deletions

View File

@ -58,6 +58,15 @@ namespace OpenSim.Framework
public enum PermissionMask : uint public enum PermissionMask : uint
{ {
None = 0, None = 0,
// folded perms
foldedTransfer = 1,
foldedModify = 1 << 1,
foldedCopy = 1 << 2,
foldedMask = 0x07,
//
Transfer = 1 << 13, Transfer = 1 << 13,
Modify = 1 << 14, Modify = 1 << 14,
Copy = 1 << 15, Copy = 1 << 15,
@ -243,14 +252,12 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
/// <param name="a">A 3d vector</param> /// <param name="a">A 3d vector</param>
/// <returns>A new vector which is normalized form of the vector</returns> /// <returns>A new vector which is normalized form of the vector</returns>
/// <remarks>The vector paramater cannot be <0,0,0></remarks>
public static Vector3 GetNormalizedVector(Vector3 a) public static Vector3 GetNormalizedVector(Vector3 a)
{ {
if (IsZeroVector(a)) Vector3 v = new Vector3(a.X, a.Y, a.Z);
throw new ArgumentException("Vector paramater cannot be a zero vector."); v.Normalize();
return v;
float Mag = (float) GetMagnitude(a);
return new Vector3(a.X / Mag, a.Y / Mag, a.Z / Mag);
} }
/// <summary> /// <summary>