summaryrefslogtreecommitdiff
path: root/scene/2d/polygon_2d.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-01-29 23:10:32 -0500
committerAaron Franke <arnfranke@yahoo.com>2021-03-19 13:04:45 -0400
commit6811a45b595133b5fb0889a64b455856b46338d7 (patch)
treea281bb871e09124db89f14a5f010a9bfde7f8f26 /scene/2d/polygon_2d.cpp
parentec3f220098f4bf5a10809e6682a9a24ff93d85cb (diff)
Use real_t in non-physics 2D nodes
Diffstat (limited to 'scene/2d/polygon_2d.cpp')
-rw-r--r--scene/2d/polygon_2d.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index 2bb75e5967..1a7038bb80 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -160,8 +160,8 @@ void Polygon2D::_notification(int p_what) {
if (invert) {
Rect2 bounds;
int highest_idx = -1;
- float highest_y = -1e20;
- float sum = 0.0;
+ real_t highest_y = -1e20;
+ real_t sum = 0.0;
for (int i = 0; i < len; i++) {
if (i == 0) {
@@ -279,7 +279,7 @@ void Polygon2D::_notification(int p_what) {
//normalize the weights
for (int i = 0; i < vc; i++) {
- float tw = 0.0;
+ real_t tw = 0.0;
for (int j = 0; j < 4; j++) {
tw += weightsw[i * 4 + j];
}
@@ -432,20 +432,20 @@ Vector2 Polygon2D::get_texture_offset() const {
return tex_ofs;
}
-void Polygon2D::set_texture_rotation(float p_rot) {
+void Polygon2D::set_texture_rotation(real_t p_rot) {
tex_rot = p_rot;
update();
}
-float Polygon2D::get_texture_rotation() const {
+real_t Polygon2D::get_texture_rotation() const {
return tex_rot;
}
-void Polygon2D::set_texture_rotation_degrees(float p_rot) {
+void Polygon2D::set_texture_rotation_degrees(real_t p_rot) {
set_texture_rotation(Math::deg2rad(p_rot));
}
-float Polygon2D::get_texture_rotation_degrees() const {
+real_t Polygon2D::get_texture_rotation_degrees() const {
return Math::rad2deg(get_texture_rotation());
}
@@ -477,12 +477,12 @@ bool Polygon2D::get_antialiased() const {
return antialiased;
}
-void Polygon2D::set_invert_border(float p_invert_border) {
+void Polygon2D::set_invert_border(real_t p_invert_border) {
invert_border = p_invert_border;
update();
}
-float Polygon2D::get_invert_border() const {
+real_t Polygon2D::get_invert_border() const {
return invert_border;
}