亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? geometryr.cpp

?? FIRA比賽中的關鍵策略代碼
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
/*Copyright (c) 2000-2002, Jelle Kok, University of AmsterdamAll rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.3. Neither the name of the University of Amsterdam nor the names of itscontributors may be used to endorse or promote products derived from thissoftware without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNE
R OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*//*! \file Geometry.C<pre><b>File:</b>          Geometry.C<b>Project:</b>       Robocup Soccer Simulation Team: UvA Trilearn<b>Authors:</b>       Jelle Kok<b>Created:</b>       13/02/2001<b>Last Revision:</b> $ID$<b>Contents:</b>      class declarations of different geometry classes:<BR>- VecPosition: representation of a point- Line:        representation of a line- Rectangle:   representation of a rectangle- Circle:      representation of a circle- Geometry:    different geometry methodsFurthermore it contains some goniometric functions to work with sine, cosineand tangent functions using degrees and some utility functions to returnthe maximum and the minimum of two values.<hr size=2><h2><b>Changes</b></h2><b>Date</b>             <b>Author</b>          <b>Comment</b>12/02/2001       Jelle Kok       Initial version created</pre>*/#include "stdafx.h"#include "GeometryR.h"#include <stdio.h>    // needed for sprintf#include <limits.h>/*******************************************************************************************//** Following is Math functions ************************************************************//*******************************************************************************************//*! This function returns the Maths::Sign of a give double.1 is positive, -1 is negative\param d1 first parameter\return the Maths::Sign of this double */int Maths::Sign( double d1 ){	return (d1>0)?1:-1;}
int Maths::Round(double d)
{
	if (d<0)
		return Round(d+INT_MAX)-INT_MAX;
	else
		return static_cast<int>(d+0.5);
}

double Maths::Limit( double d, double dMin, double dMax)
{
	if (dMin > dMax)
	{
		double dTemp = dMin;
		dMin = dMax;
		dMax = dTemp;
	}

	if (d < dMin) d = dMin;
	if (d > dMax) d = dMax;
	return d;
}
/*! This function returns the maximum of two given doubles.\param d1 first parameter\param d2 second parameter\return the maximum of these two parameters */double Maths::Max( double d1, double d2 ){	return (d1>d2)?d1:d2;}/*! This function returns the minimum of two given doubles.\param d1 first parameter\param d2 second parameter\return the minimum of these two parameters */double Maths::Min( double d1, double d2 ){	return (d1<d2)?d1:d2;}/*! This function converts an angle in radians to the corresponding angle indegrees.\param x an angle in radians\return the corresponding angle in degrees */AngDeg Maths::Rad2Deg( AngRad x ){	return ( x * 180 / M_PI );}/*! This function converts an angle in degrees to the corresponding angle inradians.\param x an angle in degrees\return the corresponding angle in radians */AngRad Maths::Deg2Rad( AngDeg x ){	return ( x * M_PI / 180 );}/*! This function returns the cosine of a given angle in degrees using thebuilt-in cosine function that works with angles in radians.\param x an angle in degrees\return the cosine of the given angle */double Maths::cosDeg( AngDeg x ){	return ( cos( Deg2Rad( x ) ) );}/*! This function returns the sine of a given angle in degrees using thebuilt-in sine function that works with angles in radians.\param x an angle in degrees\return the sine of the given angle */double Maths::sinDeg( AngDeg x ){	return ( sin( Deg2Rad( x ) ) );}/*! This function returns the tangent of a given angle in degrees using thebuilt-in tangent function that works with angles in radians.\param x an angle in degrees\return the tangent of the given angle */double Maths::tanDeg( AngDeg x ){	return ( tan( Deg2Rad( x ) ) );}/*! This function returns the principal value of the arc tangent of x in degreesusing the built-in arc tangent function which returns this value in radians.\param x a double value\return the arc tangent of the given value in degrees */AngDeg Maths::atanDeg( double x ){	return ( Rad2Deg( atan( x ) ) );}/*! This function returns the principal value of the arc tangent of y/x indegrees using the signs of both arguments to determine the quadrant of thereturn value. For this the built-in 'atan2' function is used which returnsthis value in radians.\param x a double value\param y a double value\return the arc tangent of y/x in degrees taking the signs of x and y intoaccount */double Maths::atan2Deg( double x, double y ){	if( fabs( x ) < EPS && fabs( y ) < EPS )	return ( 0.0 );	return ( Rad2Deg( atan2( x, y ) ) );}/*! This function returns the principal value of the arc cosine of x in degreesusing the built-in arc cosine function which returns this value in radians.\param x a double value\return the arc cosine of the given value in degrees */AngDeg Maths::acosDeg( double x ){	if( x >= 1 )	return ( 0.0 );	else if( x <= -1 )	return ( 180.0 );	return ( Rad2Deg( acos( x ) ) );}/*! This function returns the principal value of the arc sine of x in degreesusing the built-in arc sine function which returns this value in radians.\param x a double value\return the arc sine of the given value in degrees */AngDeg Maths::asinDeg( double x ){	if( x >= 1 )	return ( 90.0 );	else if ( x <= -1 )	return ( -90.0 );	return ( Rad2Deg( asin( x ) ) );}/*********************************************************************************//*! This function returns a boolean value which indicates whether the value'ang' (from interval [-180..180] lies in the interval [angMin..angMax].Examples: IsAngInInterval( -100, 4, -150) returns falseIsAngInInterval(   45, 4, -150) returns true\param ang angle that should be checked\param angMin minimum angle in interval\param angMax maximum angle in interval\return boolean indicating whether ang lies in [angMin..angMax] */bool IsAngInInterval( AngRad ang, AngRad angMin, AngRad angMax ){	// convert all angles to interval 0..360	if( ( ang    + 2*M_PI ) < 2*M_PI ) ang    += 2*M_PI;	if( ( angMin + 2*M_PI ) < 2*M_PI ) angMin += 2*M_PI;	if( ( angMax + 2*M_PI ) < 2*M_PI ) angMax += 2*M_PI;	if( angMin < angMax ) // 0 ---false-- angMin ---true-----angMax---false--360	return angMin < ang && ang < angMax ;	else                  // 0 ---true--- angMax ---false----angMin---true---360	return !( angMax < ang && ang < angMin );}/*! This method returns the bisector (average) of two angles. It dealswith the boundary problem, thus when 'angMin' equals 170 and 'angMax'equals -100, -145 is returned.\param angMin minimum angle [-PI,PI]\param angMax maximum angle [-PI,PI]\return average of angMin and angMax. */AngRad GetBisectorTwoAngles( AngRad angMin, AngRad angMax ){	// separate sine and cosine part to circumvent boundary problem	return VecPosition::NormalizeAngle(	atan2( (sin( angMin) + sin( angMax ) )/2.0,	(cos( angMin) + cos( angMax ) )/2.0 ) );}/******************************************************************************//********************   CLASS VECPOSITION   ***********************************//******************************************************************************//*! Constructor for the VecPosition claSS-> When the supplied Coordinate Systemtype equals CARTESIAN, the arguments x and y denote the x- and y-coordinatesof the new position. When it equals POLAR however, the arguments x and ydenote the polar coordinates of the new position; in this case x is thusequal to the distance r from the origin and y is equal to the angle phi thatthe polar vector Makes with the x-axis.\param x the x-coordinate of the new position when cs == CARTESIAN; thedistance of the new position from the origin when cs = POLAR\param y the y-coordinate of the new position when cs = CARTESIAN; theangle that the polar vector Makes with the x-axis when cs = POLAR\param cs a CoordSystemT indicating whether x and y denote cartesiancoordinates or polar coordinates\return the VecPosition corresponding to the given arguments */VecPosition::VecPosition( double x, double y, CoordSystemT cs ){	SetVecPosition( x, y, cs );}/*! Overloaded version of unary minus operator for VecPositions. It returns thenegative VecPosition, i.e. both the x- and y-coordinates are multiplied by-1. The current VecPosition itself is left unchanged.\return a negated version of the current VecPosition */VecPosition VecPosition::operator - ( ){	return ( VecPosition( -m_x, -m_y ) );}/*! Overloaded version of the binary plus operator for adding a given doublevalue to a VecPosition. The double value is added to both the x- andy-coordinates of the current VecPosition. The current VecPosition itself isleft unchanged.\param d a double value which has to be added to both the x- andy-coordinates of the current VecPosition\return the result of adding the given double value to the currentVecPosition */VecPosition VecPosition::operator + ( const double &d ){	return ( VecPosition( m_x + d, m_y + d ) );}/*! Overloaded version of the binary plus operator for VecPositions. It returnsthe sum of the current VecPosition and the given VecPosition by adding theirx- and y-coordinates. The VecPositions themselves are left unchanged.\param p a VecPosition\return the sum of the current VecPosition and the given VecPosition */VecPosition VecPosition::operator + ( const VecPosition &p ){	return ( VecPosition( m_x + p.m_x, m_y + p.m_y ) );}/*! Overloaded version of the binary minus operator for subtracting a givendouble value from a VecPosition. The double value is subtracted from boththe x- and y-coordinates of the current VecPosition. The current VecPositionitself is left unchanged.\param d a double value which has to be subtracted from both the x- andy-coordinates of the current VecPosition\return the result of subtracting the given double value from the currentVecPosition */VecPosition VecPosition::operator - ( const double &d ){	return ( VecPosition( m_x - d, m_y - d ) );}/*! Overloaded version of the binary minus operator for VecPositions. It returnsthe difference between the current VecPosition and the given VecPosition bysubtracting their x- and y-coordinates. The VecPositions themselves are leftunchanged.\param p a VecPosition\return the difference between the current VecPosition and the givenVecPosition */VecPosition VecPosition::operator - ( const VecPosition &p ){	return ( VecPosition( m_x - p.m_x, m_y - p.m_y ) );}/*! Overloaded version of the multiplication operator for multiplying aVecPosition by a given double value. Both the x- and y-coordinates of thecurrent VecPosition are multiplied by this value. The current VecPositionitself is left unchanged.\param d the multiplication factor\return the result of multiplying the current VecPosition by the givendouble value */VecPosition VecPosition::operator * ( const double &d  ){	return ( VecPosition( m_x * d, m_y * d  ) );}/*! Overloaded version of the multiplication operator for VecPositions. Itreturns the product of the current VecPosition and the given VecPosition bymultiplying their x- and y-coordinates. The VecPositions themselves are leftunchanged.\param p a VecPosition\return the product of the current VecPosition and the given VecPosition */VecPosition VecPosition::operator * ( const VecPosition &p ){	return ( VecPosition( m_x * p.m_x, m_y * p.m_y ) );}/*! Overloaded version of the division operator for dividing a VecPosition by agiven double value. Both the x- and y-coordinates of the current VecPositionare divided by this value. The current VecPosition itself is left unchanged.\param d the division factor\return the result of dividing the current VecPosition by the given doublevalue */VecPosition VecPosition::operator / ( const double &d ){	return ( VecPosition( m_x / d, m_y / d  ) );}/*! Overloaded version of the division operator for VecPositions. It returns thequotient of the current VecPosition and the given VecPosition by dividingtheir x- and y-coordinates. The VecPositions themselves are left unchanged.\param p a VecPosition\return the quotient of the current VecPosition and the given VecPosition */VecPosition VecPosition::operator / ( const VecPosition &p ){	return ( VecPosition( m_x / p.m_x, m_y / p.m_y ) );}/*! Overloaded version of the assignment operator for assigning a given doublevalue to both the x- and y-coordinates of the current VecPosition. Thischanges the current VecPosition itself.\param d a double value which has to be assigned to both the x- andy-coordinates of the current VecPosition */void VecPosition::operator = ( const double &d ){	m_x = d;	m_y = d;}/*! Overloaded version of the sum-assignment operator for VecPositions. Itreturns the sum of the current VecPosition and the given VecPosition byadding their x- and y-coordinates. This changes the current VecPositionitself.\param p a VecPosition which has to be added to the current VecPosition */void VecPosition::operator +=( const VecPosition &p ){	m_x += p.m_x;	m_y += p.m_y;}/*! Overloaded version of the sum-assignment operator for adding a given doublevalue to a VecPosition. The double value is added to both the x- andy-coordinates of the current VecPosition. This changes the currentVecPosition itself.\param d a double value which has to be added to both the x- andy-coordinates of the current VecPosition */void VecPosition::operator += ( const double &d )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区四区在线观看| 4hu四虎永久在线影院成人| 色女孩综合影院| 精品国产凹凸成av人导航| 亚洲精品国产a| 国产精品一区在线观看乱码| 欧美日本在线观看| 国产精品国产三级国产a| 另类小说视频一区二区| 欧美日韩你懂得| 一区二区三区鲁丝不卡| 懂色av中文一区二区三区| 精品久久久久99| 三级欧美在线一区| 欧美日韩综合一区| 亚洲激情av在线| 99精品视频免费在线观看| 久久久久国产一区二区三区四区| 日韩影视精彩在线| 欧美怡红院视频| 亚洲一区二区三区四区在线 | 337p日本欧洲亚洲大胆精品| 亚洲国产精品一区二区www | 亚洲色图欧美在线| 丁香六月久久综合狠狠色| 日韩精品中午字幕| 麻豆精品精品国产自在97香蕉| 欧美日韩视频不卡| 夜夜嗨av一区二区三区四季av| 不卡av免费在线观看| 中文字幕精品一区二区三区精品| 久久99精品久久久久久国产越南 | 久久先锋影音av鲁色资源网| 日本不卡一二三区黄网| 91麻豆精品国产自产在线观看一区 | 色噜噜久久综合| 依依成人精品视频| 欧美在线一二三四区| 午夜视频一区二区| 日韩三级电影网址| 激情深爱一区二区| 国产欧美一区二区三区在线老狼| 成人性生交大片免费看在线播放| 国产精品嫩草99a| 色婷婷综合久久久中文字幕| 亚洲午夜私人影院| 日韩一区二区在线看| 国产精品99久久久久久似苏梦涵| 中文字幕乱码一区二区免费| 91丨porny丨蝌蚪视频| 一区二区激情视频| 欧美videos中文字幕| 国产精品99久久久久| 亚洲欧美日韩在线| 欧美精品tushy高清| 久久超碰97中文字幕| 国产精品久久久久aaaa| 欧美色视频一区| 狠狠色综合播放一区二区| 中文字幕 久热精品 视频在线| 色狠狠色狠狠综合| 久久精品国产澳门| 亚洲欧美激情一区二区| 日韩一卡二卡三卡国产欧美| 国产69精品久久久久777| 亚洲一区二区三区四区中文字幕 | 日本一区二区三区四区在线视频| 色综合网站在线| 经典一区二区三区| 亚洲精品一卡二卡| 欧美变态tickling挠脚心| 99久久99久久久精品齐齐| 美日韩一区二区| 亚洲精选免费视频| 久久久久国产成人精品亚洲午夜| 91成人看片片| 国产91精品免费| 美女久久久精品| 一区二区三区在线看| 久久久国产一区二区三区四区小说 | 岛国精品一区二区| 婷婷久久综合九色综合绿巨人| 久久久久亚洲蜜桃| 欧美日本韩国一区二区三区视频| 国产一区二区精品久久99 | 亚洲欧美激情小说另类| 日韩免费视频一区二区| 色综合天天综合在线视频| 国产美女在线精品| 日产国产欧美视频一区精品| 一区二区三区蜜桃| 亚洲欧美在线高清| 中文字幕不卡在线观看| 日韩免费成人网| 91精品国产综合久久精品 | 亚洲国产另类av| 亚洲色图视频免费播放| 国产片一区二区| 久久蜜桃一区二区| 精品国产欧美一区二区| 日韩午夜激情免费电影| 精品视频全国免费看| 色88888久久久久久影院野外| 国产成人在线观看| 国产麻豆成人传媒免费观看| 久久不见久久见免费视频1| 日韩综合小视频| 午夜婷婷国产麻豆精品| 一个色在线综合| 一区二区在线观看免费视频播放| 国产精品久久久久久久久快鸭| 日本一区免费视频| 国产欧美日本一区二区三区| 国产色综合一区| 日本一区二区三区国色天香| 亚洲国产成人在线| 一区免费观看视频| 亚洲精选视频在线| 午夜电影久久久| 男女性色大片免费观看一区二区 | 国产亚洲精品免费| 国产日韩欧美电影| 国产精品入口麻豆原神| 国产精品国产自产拍高清av| 亚洲乱码国产乱码精品精的特点 | 欧美日韩成人综合天天影院| 欧美午夜在线一二页| 欧美午夜电影一区| 91精品国产aⅴ一区二区| 欧美一级理论片| 久久色.com| 亚洲视频在线一区观看| 亚洲国产裸拍裸体视频在线观看乱了 | 美女在线观看视频一区二区| 久久99国产精品尤物| 成人动漫一区二区在线| 在线观看视频一区二区欧美日韩| 91.麻豆视频| 国产午夜精品久久久久久久| 亚洲欧美色一区| 五月婷婷另类国产| 国产不卡视频一区二区三区| 色伊人久久综合中文字幕| 欧美人狂配大交3d怪物一区| 国产亚洲一区字幕| 一区二区成人在线观看| 狠狠色丁香婷婷综合久久片| 成人动漫精品一区二区| 欧美日韩激情一区| 久久久久久亚洲综合影院红桃| 中文字幕在线观看一区二区| 亚洲成人黄色小说| 国产一区二区久久| 欧美日韩一区二区在线观看| 久久久久久日产精品| 亚洲国产成人av好男人在线观看| 国产精品中文字幕日韩精品| 色拍拍在线精品视频8848| 精品久久久久久久久久久久包黑料| 国产欧美视频一区二区| 日韩高清中文字幕一区| 91一区二区三区在线观看| 日韩三级伦理片妻子的秘密按摩| 亚洲欧美日韩久久| 国产酒店精品激情| 欧美女孩性生活视频| 国产精品久久久一本精品| 麻豆一区二区三| 91行情网站电视在线观看高清版| 久久嫩草精品久久久精品一| 丝袜脚交一区二区| 色婷婷av久久久久久久| 日本一区二区三区国色天香| 精品一二线国产| 91麻豆精品国产91久久久| 一区二区三区四区中文字幕| 粉嫩嫩av羞羞动漫久久久 | 一区二区三区小说| 成人永久免费视频| 欧美不卡一区二区| 免费亚洲电影在线| 欧美性大战久久久| 一区二区三区精密机械公司| 国产成人av自拍| 精品久久久久香蕉网| 婷婷亚洲久悠悠色悠在线播放| 色综合天天综合在线视频| 国产精品二三区| 成人性色生活片| 久久久激情视频| 国产精品亚洲第一区在线暖暖韩国| 91精品国产手机| 日韩精品国产欧美| 欧美精品免费视频| 午夜欧美一区二区三区在线播放| 在线国产电影不卡| 亚洲成人激情社区| 欧美一区国产二区| 蜜桃免费网站一区二区三区| 91精品国产高清一区二区三区蜜臀|