⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vec.java

📁 Java mulitplayer strategy game. Adaptation of KDE Galaxy Conquest. (rules are changed - but still th
💻 JAVA
字号:
package net.sf.jawp.gui.client.semi3d;

/**
 * 
 * @author from javaworld
 * @version $Revision: 1.2 $
 *
 */
public class Vec
{
	double x, y, z;

	public Vec(final double x, final double y, final double z)
	{
		this.x = x;
		this.y = y;
		this.z = z;
	}

	double getLength()
	{
		return Math.sqrt(x * x + y * y + z * z);
	}

	void scale(final double scale)
	{
		x *= scale;
		y *= scale;
		z *= scale;
	}

	double dot(final Vec v)
	{
		return x * v.x + y * v.y + z * v.z;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -