| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] |
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0006147 | opensim | [REGION] Scripting Engine | public | 2012-08-10 15:22 | 2012-08-29 13:55 |
|
| Reporter | SignpostMarv | |
| Assigned To | melanie | |
| Priority | low | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | won't fix | |
| Platform | | OS | | OS Version | |
| Product Version | | |
| Target Version | | Fixed in Version | | |
|
| Summary | 0006147: Add Phi constant to script engine |
| Description | Minor issue, I noticed we have PI but no PHI |
| Tags | No tags attached. |
|
| Git Revision or version number | 19417fca41e |
| Run Mode | Standalone (1 Region) |
| Physics Engine | BasicPhysics |
| Environment | .NET / Windows32 |
| Mono Version | None |
| Viewer | |
|
| Attached Files | PHI.patch [^] (1,371 bytes) 2012-08-10 15:22 [Show Content] [Hide Content]From e1570d3b33ba4204521eb3eb1efd9410cc75aed2 Mon Sep 17 00:00:00 2001
From: SignpostMarv <github@signpostmarv.name>
Date: Fri, 10 Aug 2012 16:19:30 +0100
Subject: [PATCH] adding PHI constants ala PI
---
OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index c3eada0..d9a07aa 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -451,9 +451,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const string NULL_KEY = "00000000-0000-0000-0000-000000000000";
public const string EOF = "\n\n\n";
+
public const double PI = 3.14159274f;
public const double TWO_PI = 6.28318548f;
public const double PI_BY_TWO = 1.57079637f;
+
+ public const double PHI = 1.618033988749895f; // (1 + sqrt(5)) / 2
+ public const double TWO_PHI = 3.23606797749979f;
+ public const double PHI_BY_TWO = 0.8090169943749475f;
+
public const double DEG_TO_RAD = 0.01745329238f;
public const double RAD_TO_DEG = 57.29578f;
public const double SQRT2 = 1.414213538f;
--
1.7.11.msysgit.1
|
|