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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? geometry.c

?? 機(jī)器足球2D比賽程序 對(duì)trlen_base_2002的改進(jìn)
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
/*Copyright (c) 2000-2002, Jelle Kok, University of AmsterdamAll rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, this list 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 documentation and/or other materials provided with the distribution. 3. Neither the name of the University of Amsterdam nor the names of its contributors may be used to endorse or promote products derived from this software 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, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 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 "Geometry.h"#include <stdio.h>    // needed for sprintf/*! This function returns the sign of a give double.    1 is positive, -1 is negative    \param d1 first parameter    \return the sign of this double */int sign( double d1 ){  return (d1>0)?1:-1;}/*! 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 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 min( double d1, double d2 ){  return (d1<d2)?d1:d2;}/*! This function converts an angle in radians to the corresponding angle in    degrees.    \param x an angle in radians    \return the corresponding angle in degrees */AngDeg Rad2Deg( AngRad x ){  return ( x * 180 / M_PI );}/*! This function converts an angle in degrees to the corresponding angle in    radians.    \param x an angle in degrees    \return the corresponding angle in radians */AngRad Deg2Rad( AngDeg x ){  return ( x * M_PI / 180 );}/*! This function returns the cosine of a given angle in degrees using the    built-in cosine function that works with angles in radians.    \param x an angle in degrees    \return the cosine of the given angle */double cosDeg( AngDeg x ){  return ( cos( Deg2Rad( x ) ) );}/*! This function returns the sine of a given angle in degrees using the    built-in sine function that works with angles in radians.    \param x an angle in degrees    \return the sine of the given angle */double sinDeg( AngDeg x ){  return ( sin( Deg2Rad( x ) ) );}/*! This function returns the tangent of a given angle in degrees using the    built-in tangent function that works with angles in radians.    \param x an angle in degrees    \return the tangent of the given angle */double tanDeg( AngDeg x ){  return ( tan( Deg2Rad( x ) ) );}/*! This function returns the principal value of the arc tangent of x in degrees    using 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 atanDeg( double x ){  return ( Rad2Deg( atan( x ) ) );}/*! This function returns the principal value of the arc tangent of y/x in    degrees using the signs of both arguments to determine the quadrant of the    return value. For this the built-in 'atan2' function is used which returns    this 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 into    account */double atan2Deg( double x, double y ){  if( fabs( x ) < EPSILON && fabs( y ) < EPSILON )    return ( 0.0 );  return ( Rad2Deg( atan2( x, y ) ) );}/*! This function returns the principal value of the arc cosine of x in degrees    using 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 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 degrees    using 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 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 false             isAngInInterval(   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( AngDeg ang, AngDeg angMin, AngDeg angMax ){  // convert all angles to interval 0..360  if( ( ang    + 360 ) < 360 ) ang    += 360;  if( ( angMin + 360 ) < 360 ) angMin += 360;  if( ( angMax + 360 ) < 360 ) angMax += 360;  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 deals    with the boundary problem, thus when 'angMin' equals 170 and 'angMax'    equals -100, -145 is returned.    \param angMin minimum angle [-180,180]    \param angMax maximum angle [-180,180]    \return average of angMin and angMax. */AngDeg getBisectorTwoAngles( AngDeg angMin, AngDeg angMax ){  // separate sine and cosine part to circumvent boundary problem  return VecPosition::normalizeAngle(            atan2Deg( (sinDeg( angMin) + sinDeg( angMax ) )/2.0,                      (cosDeg( angMin) + cosDeg( angMax ) )/2.0 ) );}/******************************************************************************//********************   CLASS VECPOSITION   ***********************************//******************************************************************************//*! Constructor for the VecPosition class. When the supplied Coordinate System    type equals CARTESIAN, the arguments x and y denote the x- and y-coordinates    of the new position. When it equals POLAR however, the arguments x and y    denote the polar coordinates of the new position; in this case x is thus     equal to the distance r from the origin and y is equal to the angle phi that    the polar vector makes with the x-axis.    \param x the x-coordinate of the new position when cs == CARTESIAN; the    distance of the new position from the origin when cs = POLAR    \param y the y-coordinate of the new position when cs = CARTESIAN; the    angle that the polar vector makes with the x-axis when cs = POLAR    \param cs a CoordSystemT indicating whether x and y denote cartesian     coordinates 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 the    negative 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 double    value to a VecPosition. The double value is added to both the x- and    y-coordinates of the current VecPosition. The current VecPosition itself is    left unchanged.    \param d a double value which has to be added to both the x- and    y-coordinates of the current VecPosition    \return the result of adding the given double value to the current    VecPosition */VecPosition VecPosition::operator + ( const double &d ){  return ( VecPosition( m_x + d, m_y + d ) );}/*! Overloaded version of the binary plus operator for VecPositions. It returns    the sum of the current VecPosition and the given VecPosition by adding their    x- 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 given    double value from a VecPosition. The double value is subtracted from both    the x- and y-coordinates of the current VecPosition. The current VecPosition    itself is left unchanged.    \param d a double value which has to be subtracted from both the x- and    y-coordinates of the current VecPosition    \return the result of subtracting the given double value from the current    VecPosition */VecPosition VecPosition::operator - ( const double &d ){  return ( VecPosition( m_x - d, m_y - d ) );}/*! Overloaded version of the binary minus operator for VecPositions. It returns    the difference between the current VecPosition and the given VecPosition by    subtracting their x- and y-coordinates. The VecPositions themselves are left    unchanged.    \param p a VecPosition    \return the difference between 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 multiplication operator for multiplying a    VecPosition by a given double value. Both the x- and y-coordinates of the    current VecPosition are multiplied by this value. The current VecPosition    itself is left unchanged.    \param d the multiplication factor    \return the result of multiplying the current VecPosition by the given    double value */VecPosition VecPosition::operator * ( const double &d  ){  return ( VecPosition( m_x * d, m_y * d  ) );}/*! Overloaded version of the multiplication operator for VecPositions. It    returns the product of the current VecPosition and the given VecPosition by    multiplying their x- and y-coordinates. The VecPositions themselves are left    unchanged.    \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 a    given double value. Both the x- and y-coordinates of the current VecPosition    are 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 double    value */VecPosition VecPosition::operator / ( const double &d ){  return ( VecPosition( m_x / d, m_y / d  ) );}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久电影网电视剧免费观看| 国产精品一级在线| 久久久久久毛片| 一本色道久久综合狠狠躁的推荐| 首页国产欧美日韩丝袜| 中文字幕乱码亚洲精品一区| 在线不卡一区二区| 97se亚洲国产综合自在线| 蜜乳av一区二区| 一区二区三区久久久| 久久综合99re88久久爱| 欧美疯狂做受xxxx富婆| 色诱视频网站一区| 国产成人三级在线观看| 蜜桃av噜噜一区| 亚洲国产cao| 亚洲欧美日韩国产中文在线| 国产日韩欧美麻豆| 日韩欧美高清dvd碟片| 欧美在线观看一二区| 国产成人av电影| 国内精品伊人久久久久影院对白| 午夜精品一区二区三区三上悠亚| 中文字幕视频一区| 国产女主播视频一区二区| 日韩欧美黄色影院| 欧美精三区欧美精三区| 在线观看区一区二| 国产一区二区三区电影在线观看 | 在线视频一区二区免费| 白白色亚洲国产精品| 国产毛片精品一区| 毛片基地黄久久久久久天堂| 日韩高清不卡在线| 视频一区视频二区中文字幕| 亚洲成人一区二区在线观看| 亚洲视频 欧洲视频| 国产欧美一区二区精品性色| 国产亚洲制服色| 久久蜜臀中文字幕| 欧美激情中文不卡| 国产蜜臀av在线一区二区三区| 亚洲国产你懂的| 午夜精品国产更新| 亚洲高清免费在线| 图片区小说区区亚洲影院| 亚洲女人小视频在线观看| 亚洲欧美日韩在线| 亚洲精品免费在线播放| 亚洲免费在线电影| 亚洲一区二区偷拍精品| 亚洲高清在线精品| 日韩av一级片| 狠狠色综合日日| 国产99一区视频免费 | 欧美日韩一区国产| 欧美日韩精品一区二区三区四区 | 午夜精品久久久久久久蜜桃app| 一区二区三区不卡视频在线观看| 亚洲一区二区三区视频在线| 亚洲无线码一区二区三区| 视频一区二区不卡| 久久激五月天综合精品| 国产一区二区成人久久免费影院 | 亚洲尤物视频在线| 亚洲bt欧美bt精品| 日本中文字幕一区| 国产在线国偷精品免费看| 成人在线一区二区三区| 91看片淫黄大片一级在线观看| 欧美在线视频全部完| 欧美一区2区视频在线观看| 久久久久久久网| 亚洲女人的天堂| 日韩黄色片在线观看| 国产精品一级在线| 在线一区二区视频| 欧美一级淫片007| 欧美国产日韩在线观看| 亚洲国产精品自拍| 国产一区二区三区四区五区美女| 91在线观看免费视频| 91精品国产黑色紧身裤美女| 中文字幕 久热精品 视频在线| 一区二区三区自拍| 极品少妇一区二区三区精品视频| 99久久婷婷国产综合精品电影| 制服.丝袜.亚洲.另类.中文| 国产精品美女久久久久av爽李琼| 亚洲aⅴ怡春院| 成人高清免费观看| 777xxx欧美| 亚洲欧美日韩小说| 久久99精品久久久久久国产越南| 99久久精品免费看国产| 精品国产一区二区国模嫣然| 一二三区精品视频| 国产乱码精品一区二区三| 欧美日韩精品一区二区在线播放| 中文字幕巨乱亚洲| 久久精品国产精品亚洲综合| 欧美亚洲精品一区| 国产精品久久久久久久久免费樱桃| 日韩激情一二三区| 色www精品视频在线观看| 精品av综合导航| 天天综合色天天综合色h| 99r国产精品| 26uuu色噜噜精品一区| 亚洲电影激情视频网站| 99vv1com这只有精品| 国产日韩精品一区二区三区| 免费人成网站在线观看欧美高清| 色婷婷亚洲精品| 国产精品萝li| 国产成人精品一区二| 日韩欧美自拍偷拍| 日本午夜精品一区二区三区电影| 99免费精品视频| 国产日产欧美一区二区视频| 久久国产免费看| 7777精品伊人久久久大香线蕉经典版下载 | 国产精品久久一卡二卡| 国产河南妇女毛片精品久久久| 日韩欧美一区二区久久婷婷| 午夜欧美电影在线观看| 色婷婷久久一区二区三区麻豆| 欧美激情一区二区三区四区| 狠狠色综合色综合网络| 日韩三级高清在线| 美女视频黄 久久| 欧美一区二区三区视频在线| 亚洲综合一区在线| 色呦呦网站一区| 亚洲欧美经典视频| 99久久er热在这里只有精品15| 国产欧美精品一区| 成熟亚洲日本毛茸茸凸凹| 国产亚洲一区二区在线观看| 精品午夜久久福利影院| 精品国产青草久久久久福利| 激情综合色综合久久| 国产视频一区二区三区在线观看| 国产黄人亚洲片| 中文字幕制服丝袜一区二区三区 | 国产成人精品一区二| 中文成人av在线| 99re8在线精品视频免费播放| 中文字幕永久在线不卡| 色哟哟国产精品| 一区二区欧美在线观看| 欧美日韩激情一区二区三区| 天天操天天色综合| 日韩限制级电影在线观看| 国产揄拍国内精品对白| 国产精品美女久久久久久久 | 精品亚洲免费视频| 国产三级精品三级| 色诱视频网站一区| 日本欧洲一区二区| 久久综合九色综合97_久久久| 成人涩涩免费视频| 亚洲自拍与偷拍| 日韩情涩欧美日韩视频| 成人免费视频caoporn| 欧美一级欧美三级在线观看| 99久久综合狠狠综合久久| 亚洲欧美日韩国产综合| 欧美区一区二区三区| 蜜桃精品视频在线| 欧美国产日韩一二三区| 色婷婷综合久久| 伦理电影国产精品| 国产精品―色哟哟| 欧美性受xxxx黑人xyx| 久久不见久久见中文字幕免费| 国产欧美一区二区三区网站| 在线观看视频一区二区| 麻豆精品国产91久久久久久| 中文字幕电影一区| 欧美老人xxxx18| 成人一二三区视频| 日韩精品高清不卡| 国产精品系列在线| 91麻豆精品国产91久久久久久久久| 国产精品一区二区黑丝| 亚洲成人av一区| 国产精品私人自拍| 日韩精品一区二区三区中文精品| 99久久精品一区| 激情综合色综合久久综合| 一区二区三区视频在线看| 精品国产91亚洲一区二区三区婷婷| 91小视频免费观看| 久久97超碰国产精品超碰| 亚洲精品自拍动漫在线| 久久综合精品国产一区二区三区| 精品视频在线看| 91在线云播放| 国产福利精品一区|