Import of pkgsrc-2014Q1

This commit is contained in:
2014-04-17 16:38:45 +02:00
parent 785076ae39
commit 9a8c06dafb
19365 changed files with 828089 additions and 278039 deletions

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-kolf_vector.cpp,v 1.1 2013/09/12 20:11:30 jperkin Exp $
Avoid "error: call of overloaded <func> is ambiguous"
--- kolf/vector.cpp.orig 2005-09-10 08:18:11.000000000 +0000
+++ kolf/vector.cpp
@@ -6,14 +6,14 @@
// Creates a vector with between two points
Vector::Vector(const QPoint &source, const QPoint &dest) {
- _magnitude = sqrt(pow(source.x() - dest.x(), 2) + pow(source.y() - dest.y(), 2));
- _direction = atan2(source.y() - dest.y(), source.x() - dest.x());
+ _magnitude = sqrt(pow((float)source.x() - dest.x(), 2) + pow((float)source.y() - dest.y(), 2));
+ _direction = atan2((float)source.y() - dest.y(), source.x() - dest.x());
}
// Creates a vector with between two points
Vector::Vector(const Point &source, const Point &dest) {
- _magnitude = sqrt(pow(source.x - dest.x, 2) + pow(source.y - dest.y, 2));
- _direction = atan2(source.y - dest.y, source.x - dest.x);
+ _magnitude = sqrt(pow((float)source.x - dest.x, 2) + pow((float)source.y - dest.y, 2));
+ _direction = atan2((float)source.y - dest.y, source.x - dest.x);
}
// Creates an empty Vector