diff options
author | Melanie Thielker | 2008-09-18 12:44:18 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-18 12:44:18 +0000 |
commit | bf0b7eaecbb535356cf99ab3e2b013925d7287d6 (patch) | |
tree | 8976d48adf2e7d994a1fa1a89fccd3d4669addfb /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | XEngine API refactor. Fully implement ALL_SIDES with sanity checks. (diff) | |
download | opensim-SC-bf0b7eaecbb535356cf99ab3e2b013925d7287d6.zip opensim-SC-bf0b7eaecbb535356cf99ab3e2b013925d7287d6.tar.gz opensim-SC-bf0b7eaecbb535356cf99ab3e2b013925d7287d6.tar.bz2 opensim-SC-bf0b7eaecbb535356cf99ab3e2b013925d7287d6.tar.xz |
Another pointless multiplication/division removed
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c7de12f..b4369df 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1187,12 +1187,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1187 | int i; | 1187 | int i; |
1188 | double sum = 0.0; | 1188 | double sum = 0.0; |
1189 | for (i = 0 ; i < GetNumberOfSides(part) ; i++) | 1189 | for (i = 0 ; i < GetNumberOfSides(part) ; i++) |
1190 | sum += (double)((tex.GetFace((uint)i).RGBA.A * 255) / 255); | 1190 | sum += (double)tex.GetFace((uint)i).RGBA.A; |
1191 | return sum; | 1191 | return sum; |
1192 | } | 1192 | } |
1193 | if (face >= 0 && face < GetNumberOfSides(part)) | 1193 | if (face >= 0 && face < GetNumberOfSides(part)) |
1194 | { | 1194 | { |
1195 | return (double)((tex.GetFace((uint)face).RGBA.A * 255) / 255); | 1195 | return (double)tex.GetFace((uint)face).RGBA.A; |
1196 | } | 1196 | } |
1197 | return 0.0; | 1197 | return 0.0; |
1198 | } | 1198 | } |