diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-23 01:16:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-23 01:16:59 +0400 |
commit | d2a37d464a81959eb3409115f320c83af4398934 (patch) | |
tree | 20fea786bd6d1fc8113c3ea7c2c5dab437ff52ff /source/blender/editors/space_node | |
parent | 1a81499d413e748a26b5f51c5488f257b404e48e (diff) |
code cleanup: double promotion warnings
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 8b7e0dd0db1..76003be8dc9 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2281,15 +2281,15 @@ void node_composit_backdrop_viewer(SpaceNode* snode, ImBuf* backdrop, bNode* nod void node_composit_backdrop_boxmask(SpaceNode* snode, ImBuf* backdrop, bNode* node, int x, int y) { - NodeBoxMask * boxmask = node->storage; + NodeBoxMask *boxmask = node->storage; const float backdropWidth = backdrop->x; const float backdropHeight = backdrop->y; const float aspect = backdropWidth/backdropHeight; - const float rad = DEG2RAD(-boxmask->rotation); - const float cosine = cos(rad); - const float sine = sin(rad); - const float halveBoxWidth = backdropWidth*(boxmask->width/2.0f); - const float halveBoxHeight = backdropHeight*(boxmask->height/2.0f)*aspect; + const float rad = DEG2RADF(-boxmask->rotation); + const float cosine = cosf(rad); + const float sine = sinf(rad); + const float halveBoxWidth = backdropWidth * (boxmask->width / 2.0f); + const float halveBoxHeight = backdropHeight * (boxmask->height / 2.0f) * aspect; float cx, cy, x1, x2, x3, x4; float y1, y2, y3, y4; @@ -2325,12 +2325,12 @@ void node_composit_backdrop_ellipsemask(SpaceNode* snode, ImBuf* backdrop, bNode NodeEllipseMask * ellipsemask = node->storage; const float backdropWidth = backdrop->x; const float backdropHeight = backdrop->y; - const float aspect = backdropWidth/backdropHeight; - const float rad = DEG2RAD(-ellipsemask->rotation); - const float cosine = cos(rad); - const float sine = sin(rad); - const float halveBoxWidth = backdropWidth*(ellipsemask->width/2.0f); - const float halveBoxHeight = backdropHeight*(ellipsemask->height/2.0f)*aspect; + const float aspect = backdropWidth / backdropHeight; + const float rad = DEG2RADF(-ellipsemask->rotation); + const float cosine = cosf(rad); + const float sine = sinf(rad); + const float halveBoxWidth = backdropWidth * (ellipsemask->width / 2.0f); + const float halveBoxHeight = backdropHeight * (ellipsemask->height / 2.0f) * aspect; float cx, cy, x1, x2, x3, x4; float y1, y2, y3, y4; |