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

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

?? trig.java

?? 用java開發的一個實施策略游戲源碼 值得學習一下
?? JAVA
字號:
/*
	Netwar
	Copyright (C) 2002  Daniel Grund, Kyle Kakligian, Jason Komutrattananon, & Brian Hibler.

	This file is part of Netwar.

	Netwar is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	Netwar is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Netwar; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package netwar.utils;

/** This is a purely static class used to perform trigonometric calculations rapidly.
 * To accomplish this, Trig uses a static array of precalculated results,
 * and merely performs an array look-up when the actual value is needed.
 * As a result, Trig.initialize() must be called once before any of the Trig methods are called.
 * Features like error trapping and automatic initialization at the first use were left out,
 * because it would slow the performance of the methods, which are intended to be called up to
 * several thousand times per second.
 * @author Group N2 - Project Netwar
 * @author Daniel Grund
  * @author Kyle Kakligian
 */
public class Trig {
  /** This is the number of angular units in a full circle.
    * Since the value is currently 360, they will be referred to as degrees.
    * This value can be changed to use another form of angular unit.
    * Note that the resolution of the sin/cos methods in Trig is equal to one angular unit.
    */
  public static final int fullCircle = 360;
  /** This is the number of angular units in a right angle.
    * If this is not exactly one fourth of fullCircle, it will cause miscalculations.
    * This is pre-calculated, to prevent an unnecessary divide from being added to each cos call.
    */
  public static final int right = 90;
  private static float sine[] = null;
  /** Sets up the Trig lookup table.
   */
  static {
    int i;
    if(sine == null) {
      sine = new float[fullCircle];
      for(i = 0; i < fullCircle; i++)
        sine[i] = (float)Math.sin((float)i / fullCircle * 2 * Math.PI);
    }
  }
  /** Returns the sine of the angle.
   * @param a The angle, in degrees.
   * @return The sine of a.
   * @see normalize(int)
   */
  public static float sin(int a) {return sine[a];}
  /** Returns the cosine of the angle.
   * @param a The angle, in degrees.
   * @return The cosine of a.
   * @see normalize(int)
   */
  public static float cos(int a) {
    if(a <= right)
      return sine[right - a];
    return sine[fullCircle + right - a];
  }
  /** Returns the measure of an angle in angular units (degrees) which has a measure of factor times pi radians.
   * Example: a factor of 1 corresponds to an angle of pi radians, which is 180 degrees, so pi(1) returns 180.
   * @param factor A number to multiply by PI to get the radian measure of an angle.
   * @return The degree measure of that angle.
   */
  static public int pi(float factor) {
    return (int)((long)(fullCircle * factor / 2) % (fullCircle));
  }
  /** Returns an angle equivalent to a, but guaranteed to be within the range [0, fullCirlce).
   * If an angle is less than 0 or greater than or equal to fullCircle,
   * it will cause an array out of bounds exception when you call Trig.sin or Trig.cos.
   * Use this method to ensure that your angle can be used with Trig.sin and Trig.cos.
   * @param a The angle to correct.
   * @return The corrected angle.
   */
  static public int normalize(int a) {
    a %= fullCircle;
    if(a < 0) a+= fullCircle;
    return a;
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品福利视频| 久久综合九色综合欧美亚洲| 91.com视频| 成人免费在线观看入口| 亚洲综合精品久久| 久久99国产乱子伦精品免费| 99久久精品国产一区二区三区| 欧美日韩一区二区在线观看 | 国产午夜精品一区二区| 亚洲精品乱码久久久久| 国产一区不卡视频| 91国偷自产一区二区开放时间 | 免费成人在线视频观看| 99久久免费国产| 精品成a人在线观看| 亚洲激情校园春色| 国产高清精品在线| 欧美一区二区精品在线| 亚洲精品视频一区| eeuss鲁片一区二区三区在线看| 欧美一区二区三区视频在线| 一区二区三区国产精华| av中文一区二区三区| 精品国产一区二区三区久久影院 | 国产jizzjizz一区二区| 欧美日韩一区视频| 一区二区欧美视频| 91麻豆免费视频| 国产精品久久久久婷婷| 国产成人av一区二区三区在线 | 韩国av一区二区三区在线观看| 欧美日韩国产大片| 亚洲国产精品久久人人爱蜜臀| 99久久精品国产观看| 国产精品―色哟哟| 国产精品一品视频| 久久久久久久久久久久久久久99| 麻豆成人91精品二区三区| 欧美一区二区免费视频| 久久精品72免费观看| 日韩欧美中文字幕一区| 免费视频一区二区| 久久久另类综合| 国产成人8x视频一区二区| 久久精品免视看| 成人福利视频在线看| 国产精品午夜免费| 93久久精品日日躁夜夜躁欧美| 亚洲欧美视频在线观看| 色综合色综合色综合| 亚洲一区成人在线| 91麻豆精品91久久久久同性| 久久精品国产第一区二区三区| 26uuu精品一区二区三区四区在线| 紧缚奴在线一区二区三区| 久久综合九色综合97婷婷| 国产精品一区二区在线看| 中文字幕乱码久久午夜不卡| 99久久精品国产麻豆演员表| 亚洲一区二区三区视频在线播放 | 国产精品一区二区你懂的| 国产精品每日更新| 欧美午夜精品久久久久久孕妇| 日本亚洲欧美天堂免费| 久久久综合精品| 99久久免费精品高清特色大片| 亚洲高清在线精品| 精品国产欧美一区二区| 波多野结衣的一区二区三区| 亚洲成a人片在线不卡一二三区| 日韩一二三区视频| 风流少妇一区二区| 亚洲第一精品在线| 久久久不卡影院| 欧美伊人久久久久久午夜久久久久| 免费人成精品欧美精品| 国产精品久久毛片a| 国产欧美一区二区三区鸳鸯浴| 国产91在线观看丝袜| 亚洲一区二区成人在线观看| 26uuu精品一区二区 | 久久精品国产精品青草| 国产精品久久久久久久久动漫| 欧美三级电影网站| 国产成人精品免费网站| 首页亚洲欧美制服丝腿| 1区2区3区精品视频| 欧美一二三四在线| 成人av电影在线播放| 久久99在线观看| 一级精品视频在线观看宜春院 | 欧美日韩国产经典色站一区二区三区 | 亚洲综合免费观看高清完整版 | 国产精品视频你懂的| 欧美肥妇bbw| 99久久久久免费精品国产| 美国欧美日韩国产在线播放| 亚洲人成小说网站色在线| 日韩欧美成人一区二区| 在线免费精品视频| 成人性色生活片| 九九热在线视频观看这里只有精品| 成人欧美一区二区三区小说| 精品久久人人做人人爰| 欧美日韩精品二区第二页| 97精品久久久久中文字幕 | √…a在线天堂一区| 日韩精品一区二| 欧美剧情电影在线观看完整版免费励志电影 | 精品国内片67194| 99re热这里只有精品免费视频| 久久久久国产精品厨房| 国产一区二区在线观看视频| 中文字幕中文字幕在线一区| 欧美三级三级三级爽爽爽| 久久91精品国产91久久小草| 久久九九影视网| 韩国在线一区二区| 一区二区中文字幕在线| 欧美天堂一区二区三区| 精品一区二区三区在线观看国产| 国产精品人成在线观看免费 | 在线欧美日韩精品| 欧美成人精品1314www| 欧美日韩一级大片网址| 欧美专区在线观看一区| 99免费精品视频| 高清日韩电视剧大全免费| 精品一区二区三区免费视频| 日本午夜一区二区| 亚洲影院免费观看| 亚洲一区二区欧美| 亚洲三级视频在线观看| 香蕉久久夜色精品国产使用方法| 亚洲福利国产精品| 亚洲香蕉伊在人在线观| 久久国产精品一区二区| 日韩一卡二卡三卡国产欧美| 国产一区二区在线视频| 亚洲精品成人精品456| 日韩一区在线播放| 欧美mv日韩mv亚洲| 久久久一区二区| 国产网红主播福利一区二区| 欧美肥胖老妇做爰| 精品国精品国产| 国产精品美女www爽爽爽| www一区二区| 午夜久久久久久久久| 亚洲午夜久久久久中文字幕久| 久久精品99国产精品| 在线中文字幕不卡| 国产午夜精品理论片a级大结局| 黄网站免费久久| 91免费在线播放| 亚洲精品视频在线观看免费| 国产成人亚洲综合色影视| 日韩一区中文字幕| 欧美肥大bbwbbw高潮| 日韩av一级电影| 国产精品福利一区| 欧美一区二区视频观看视频| 男女性色大片免费观看一区二区| 欧美一区二区三区在线电影| 国产91丝袜在线播放九色| 欧美日韩国产一级| 国产精品拍天天在线| 日韩经典一区二区| 欧美视频中文字幕| 国产精品久久久久久久久免费丝袜| 久久99精品国产.久久久久| 7777精品伊人久久久大香线蕉| 亚洲国产另类精品专区| 99天天综合性| 国产精品国产馆在线真实露脸| 国产99久久久国产精品潘金网站| 成人一道本在线| 亚洲欧美日韩一区二区| 日韩一区二区三区四区五区六区| 亚洲国产成人私人影院tom| 五月天婷婷综合| www.成人网.com| 日韩亚洲欧美在线| 一区二区欧美国产| av资源网一区| 久久综合狠狠综合久久激情| 亚洲国产欧美另类丝袜| 99精品视频中文字幕| 久久综合成人精品亚洲另类欧美| 香蕉影视欧美成人| 91污在线观看| 久久久一区二区三区捆绑**| 免费高清在线一区| 欧美日韩视频在线观看一区二区三区 | 中文字幕欧美国产| 国产综合久久久久久鬼色| 欧美一区二区三区性视频| 五月天久久比比资源色| 在线亚洲欧美专区二区| 中文字幕在线不卡国产视频|