[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] [bugs #9808] mid function implementation might be wrong
From: |
Adrien Cordonnier |
Subject: |
[Pingus-CVS] [bugs #9808] mid function implementation might be wrong |
Date: |
Thu, 29 Jul 2004 01:34:49 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040301 Firefox/0.8 |
This mail is an automated notification from the bugs tracker
of the project: Pingus.
/**************************************************************************/
[bugs #9808] Full Item Snapshot:
URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=9808>
Project: Pingus
Submitted by: Adrien Cordonnier
On: Thu 07/29/2004 at 05:31
Category: Game Engine
Severity: 5 - Average
Item Group: Incorrect Behaviour
Resolution: None
Assigned to: None
Status: Open
Release: 0.6.0
Platform Version: All
Planned Release: 0.6.0
Summary: mid function implementation might be wrong
Original Submission: In math.hxx, I think the mid() function might return the
middle value among the three args but 1/3 of the case it doesn't (a>b>c &
a>c>b).
template<class T>
T mid (const T& a, const T& b, const T& c)
{
return max((a), min((b), (c)));
}
might be replaced by :
template<class T>
T mid (const T& a, const T& b, const T& c)
{
return min(max(min(a, b), c), max(min(a, c), b));
}
For detailed info, follow this link:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=9808>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] [bugs #9808] mid function implementation might be wrong,
Adrien Cordonnier <=