diff options
author | letheed <letheed@outlook.com> | 2017-11-10 11:07:52 +0100 |
---|---|---|
committer | letheed <letheed@outlook.com> | 2017-11-10 12:52:07 +0100 |
commit | 482e07af7e5c8b85463f950036dc7b14cb8cd3b4 (patch) | |
tree | 3c0571bc1071e966318de890fbe2f0b45e80427f /scene/main/canvas_layer.cpp | |
parent | 4deac219b0af86b7f80168920c8bedd070aa79c0 (diff) | |
download | redot-engine-482e07af7e5c8b85463f950036dc7b14cb8cd3b4.tar.gz |
Unify degree members and properties
Diffstat (limited to 'scene/main/canvas_layer.cpp')
-rw-r--r-- | scene/main/canvas_layer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index f626c567a9..5a3814ef35 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -105,12 +105,12 @@ real_t CanvasLayer::get_rotation() const { return rot; } -void CanvasLayer::set_rotationd(real_t p_degrees) { +void CanvasLayer::set_rotation_degrees(real_t p_degrees) { set_rotation(Math::deg2rad(p_degrees)); } -real_t CanvasLayer::get_rotationd() const { +real_t CanvasLayer::get_rotation_degrees() const { return Math::rad2deg(get_rotation()); } @@ -238,8 +238,8 @@ void CanvasLayer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_rotation", "radians"), &CanvasLayer::set_rotation); ClassDB::bind_method(D_METHOD("get_rotation"), &CanvasLayer::get_rotation); - ClassDB::bind_method(D_METHOD("set_rotationd", "degrees"), &CanvasLayer::set_rotationd); - ClassDB::bind_method(D_METHOD("get_rotationd"), &CanvasLayer::get_rotationd); + ClassDB::bind_method(D_METHOD("set_rotation_degrees", "degrees"), &CanvasLayer::set_rotation_degrees); + ClassDB::bind_method(D_METHOD("get_rotation_degrees"), &CanvasLayer::get_rotation_degrees); ClassDB::bind_method(D_METHOD("set_scale", "scale"), &CanvasLayer::set_scale); ClassDB::bind_method(D_METHOD("get_scale"), &CanvasLayer::get_scale); @@ -253,7 +253,7 @@ void CanvasLayer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "layer", PROPERTY_HINT_RANGE, "-128,128,1"), "set_layer", "get_layer"); //ADD_PROPERTY( PropertyInfo(Variant::MATRIX32,"transform",PROPERTY_HINT_RANGE),"set_transform","get_transform") ; ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation"), "set_rotationd", "get_rotationd"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation"), "set_rotation_degrees", "get_rotation_degrees"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale"); } |