aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorUbitUmarov2019-09-04 23:27:48 +0100
committerUbitUmarov2019-09-04 23:27:48 +0100
commit93f13aa00d888753512b6e6488b34850a5fbed76 (patch)
treea72c5952f39946dc26c145993b89c1a5c8e81443 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentdon't wear vegetables (diff)
downloadopensim-SC-93f13aa00d888753512b6e6488b34850a5fbed76.zip
opensim-SC-93f13aa00d888753512b6e6488b34850a5fbed76.tar.gz
opensim-SC-93f13aa00d888753512b6e6488b34850a5fbed76.tar.bz2
opensim-SC-93f13aa00d888753512b6e6488b34850a5fbed76.tar.xz
add osSlerp()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7494b88..ebd281e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -5554,5 +5554,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5554 DateTime time = TimeZoneInfo.ConvertTime(DateTime.UtcNow, PSTTimeZone); 5554 DateTime time = TimeZoneInfo.ConvertTime(DateTime.UtcNow, PSTTimeZone);
5555 return time.TimeOfDay.TotalSeconds; 5555 return time.TimeOfDay.TotalSeconds;
5556 } 5556 }
5557
5558 public LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount)
5559 {
5560 if(amount < 0)
5561 amount= 0;
5562 else if(amount > 1.0)
5563 amount = 1.0;
5564 a.Normalize();
5565 b.Normalize();
5566
5567 return LSL_Rotation.Slerp(a, b, amount);
5568 }
5557 } 5569 }
5558} \ No newline at end of file 5570} \ No newline at end of file