-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python interface: Renames methods to match PEP8 style (#226)
* Use separate folder for ruby and python swig files and tests * Renames python interface to match PEP8 style * Update python examples Signed-off-by: Franco Cipollone <[email protected]> Co-authored-by: Steve Peters <[email protected]>
- Loading branch information
1 parent
cf5e33c
commit 86dc7a8
Showing
35 changed files
with
899 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (C) 2021 Open Source Robotics Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
%module angle | ||
%{ | ||
#include <ignition/math/Angle.hh> | ||
%} | ||
|
||
namespace ignition | ||
{ | ||
namespace math | ||
{ | ||
class Angle | ||
{ | ||
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) ""; | ||
%rename("%(uppercase)s", %$isstatic, %$isvariable) ""; | ||
public: static const Angle Zero; | ||
public: static const Angle Pi; | ||
%rename(HALF_PI) HalfPi; | ||
public: static const Angle HalfPi; | ||
%rename(TWO_PI) TwoPi; | ||
public: static const Angle TwoPi; | ||
public: Angle(); | ||
public: Angle(double _radian); | ||
public: Angle(const Angle &_angle); | ||
public: virtual ~Angle(); | ||
public: void SetRadian(double _radian); | ||
public: void SetDegree(double _degree); | ||
public: double Radian() const; | ||
public: double Degree() const; | ||
public: void Normalize(); | ||
public: Angle Normalized() const; | ||
public: inline double operator*() const; | ||
public: Angle operator-(const Angle &_angle) const; | ||
public: Angle operator+(const Angle &_angle) const; | ||
public: Angle operator*(const Angle &_angle) const; | ||
public: Angle operator/(const Angle &_angle) const; | ||
public: bool operator==(const Angle &_angle) const; | ||
public: bool operator<(const Angle &_angle) const; | ||
public: bool operator<=(const Angle &_angle) const; | ||
public: bool operator>(const Angle &_angle) const; | ||
public: bool operator>=(const Angle &_angle) const; | ||
}; | ||
} | ||
} |
Oops, something went wrong.