diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-19 14:41:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-19 14:41:16 +0400 |
commit | 58ab8d5c0a7e64b077e21ab2da19bca02f92ae66 (patch) | |
tree | fedbeb483a498ef23887c6239d4f69d880a04701 /source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp | |
parent | 48eb27791bcd0b28b3fad384552009fa4b712d00 (diff) |
use BLI math length functions for distance compositor operations.
Diffstat (limited to 'source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp index 32ed7486f5b..0a6f1fdfd31 100644 --- a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp @@ -29,7 +29,7 @@ DistanceYCCMatteOperation::DistanceYCCMatteOperation() : DistanceRGBMatteOperati float DistanceYCCMatteOperation::calculateDistance(float key[4], float image[4]) { - return sqrt(pow((key[1] - image[1]), 2) + - pow((key[2] - image[2]), 2)); + /* only measure the second 2 values */ + return len_v2v2(key + 1, image + 1); } |