diff options
author | Sebastian Reichel <sre@ring0.de> | 2012-10-29 16:50:13 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2012-10-29 16:50:13 +0100 |
commit | c36957203af08d44df297478911257c559767cde (patch) | |
tree | 78b7f36182f9be4e692b8e8459beb13e385d5a77 | |
parent | 305dc06de590e4319f782d058e3199435a424218 (diff) | |
download | microcopterd-c36957203af08d44df297478911257c559767cde.tar.bz2 |
add degree method to utils
-rw-r--r-- | utils.vala | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -17,6 +17,10 @@ public double radians(double degree) { return degree * (Math.PI/180.0); } +public double degree(double radians) { + return radians * (180.0/Math.PI); +} + public double constrain(double x, double a, double b) { return a > x ? a : b < x ? b : x; } |