diff options
author | Mike Mazur | 2008-07-27 05:42:47 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-27 05:42:47 +0000 |
commit | 6267db0c4c5cc36ffce709ce0798689630b32e04 (patch) | |
tree | 8612a7e68bb942a1991367587d3648e97e09eeed /OpenSim/Region | |
parent | * Ignored some bins (diff) | |
download | opensim-SC_OLD-6267db0c4c5cc36ffce709ce0798689630b32e04.zip opensim-SC_OLD-6267db0c4c5cc36ffce709ce0798689630b32e04.tar.gz opensim-SC_OLD-6267db0c4c5cc36ffce709ce0798689630b32e04.tar.bz2 opensim-SC_OLD-6267db0c4c5cc36ffce709ce0798689630b32e04.tar.xz |
Implement LSLFloat {+,-,*,/} LSLFloat operations. Fix issues 1532, 1701, 1824 &
1832.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 7ac7a65..d5211f5 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | |||
@@ -1511,6 +1511,26 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1511 | return new LSLFloat(f.value / (double)i); | 1511 | return new LSLFloat(f.value / (double)i); |
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | static public LSLFloat operator +(LSLFloat lhs, LSLFloat rhs) | ||
1515 | { | ||
1516 | return new LSLFloat(lhs.value + rhs.value); | ||
1517 | } | ||
1518 | |||
1519 | static public LSLFloat operator -(LSLFloat lhs, LSLFloat rhs) | ||
1520 | { | ||
1521 | return new LSLFloat(lhs.value - rhs.value); | ||
1522 | } | ||
1523 | |||
1524 | static public LSLFloat operator *(LSLFloat lhs, LSLFloat rhs) | ||
1525 | { | ||
1526 | return new LSLFloat(lhs.value * rhs.value); | ||
1527 | } | ||
1528 | |||
1529 | static public LSLFloat operator /(LSLFloat lhs, LSLFloat rhs) | ||
1530 | { | ||
1531 | return new LSLFloat(lhs.value / rhs.value); | ||
1532 | } | ||
1533 | |||
1514 | static public LSLFloat operator -(LSLFloat f) | 1534 | static public LSLFloat operator -(LSLFloat f) |
1515 | { | 1535 | { |
1516 | return new LSLFloat(-f.value); | 1536 | return new LSLFloat(-f.value); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 7eb5e77..77bb426 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -1579,6 +1579,26 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1579 | return new LSLFloat(f.value / (double)i); | 1579 | return new LSLFloat(f.value / (double)i); |
1580 | } | 1580 | } |
1581 | 1581 | ||
1582 | static public LSLFloat operator +(LSLFloat lhs, LSLFloat rhs) | ||
1583 | { | ||
1584 | return new LSLFloat(lhs.value + rhs.value); | ||
1585 | } | ||
1586 | |||
1587 | static public LSLFloat operator -(LSLFloat lhs, LSLFloat rhs) | ||
1588 | { | ||
1589 | return new LSLFloat(lhs.value - rhs.value); | ||
1590 | } | ||
1591 | |||
1592 | static public LSLFloat operator *(LSLFloat lhs, LSLFloat rhs) | ||
1593 | { | ||
1594 | return new LSLFloat(lhs.value * rhs.value); | ||
1595 | } | ||
1596 | |||
1597 | static public LSLFloat operator /(LSLFloat lhs, LSLFloat rhs) | ||
1598 | { | ||
1599 | return new LSLFloat(lhs.value / rhs.value); | ||
1600 | } | ||
1601 | |||
1582 | static public LSLFloat operator -(LSLFloat f) | 1602 | static public LSLFloat operator -(LSLFloat f) |
1583 | { | 1603 | { |
1584 | return new LSLFloat(-f.value); | 1604 | return new LSLFloat(-f.value); |