<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jan 27 20:37:07 CET 2013 -->
<TITLE>
Vector2 (libgdx API)
</TITLE>
<META NAME="date" CONTENT="2013-01-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Vector2 (libgdx API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Vector2.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><B>PREV CLASS
</B></A>
<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/badlogic/gdx/math/Vector2.html" target="_top"><B>FRAMES
</B></A>
<A HREF="Vector2.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
NESTED
|
<A HREF="#field_summary">FIELD
</A> |
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
<A HREF="#field_detail">FIELD
</A> |
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.badlogic.gdx.math
</FONT>
<BR>
Class Vector2
</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.math.Vector2
</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:
</B> <DD>java.io.Serializable
</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class
<B>Vector2
</B><DT>extends java.lang.Object
<DT>implements java.io.Serializable
</DL>
</PRE>
<P>
Encapsulates a 2D vector. Allows chaining methods by returning a reference to itself
<P>
<P>
<DL>
<DT><B>Author:
</B></DT>
<DD>badlogicgames@gmail.com
</DD>
<DT><B>See Also:
</B><DD><A HREF="../../../../serialized-form.html#com.badlogic.gdx.math.Vector2">Serialized Form
</A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#tmp">tmp
</A></B></CODE>
<BR>
Static temporary vector.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#tmp2">tmp2
</A></B></CODE>
<BR>
Static temporary vector.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#tmp3">tmp3
</A></B></CODE>
<BR>
Static temporary vector.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#x">x
</A></B></CODE>
<BR>
the x-component of this vector
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#X">X
</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#y">y
</A></B></CODE>
<BR>
the y-component of this vector
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#Y">Y
</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#Zero">Zero
</A></B></CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#Vector2()">Vector2
</A></B>()
</CODE>
<BR>
Constructs a new vector at (0,0)
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#Vector2(float, float)">Vector2
</A></B>(float
x,
float
y)
</CODE>
<BR>
Constructs a vector with the given components
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#Vector2(com.badlogic.gdx.math.Vector2)">Vector2
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</CODE>
<BR>
Constructs a vector from the given vector
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#add(float, float)">add
</A></B>(float
x,
float
y)
</CODE>
<BR>
Adds the given components to this vector
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#add(com.badlogic.gdx.math.Vector2)">add
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</CODE>
<BR>
Adds the given vector to this vector
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#angle()">angle
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#cpy()">cpy
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#crs(float, float)">crs
</A></B>(float
x,
float
y)
</CODE>
<BR>
Calculates the 2D cross product between this and the given vector.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#crs(com.badlogic.gdx.math.Vector2)">crs
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</CODE>
<BR>
Calculates the 2D cross product between this and the given vector.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#div(float)">div
</A></B>(float
value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#div(float, float)">div
</A></B>(float
vx,
float
vy)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#div(com.badlogic.gdx.math.Vector2)">div
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> other)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#dot(com.badlogic.gdx.math.Vector2)">dot
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#dst(float, float)">dst
</A></B>(float
x,
float
y)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#dst(com.badlogic.gdx.math.Vector2)">dst
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#dst2(float, float)">dst2
</A></B>(float
x,
float
y)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#dst2(com.badlogic.gdx.math.Vector2)">dst2
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#epsilonEquals(com.badlogic.gdx.math.Vector2, float)">epsilonEquals
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> obj,
float
epsilon)
</CODE>
<BR>
Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#equals(java.lang.Object)">equals
</A></B>(java.lang.Object
obj)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#hashCode()">hashCode
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#len()">len
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#len2()">len2
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#lerp(com.badlogic.gdx.math.Vector2, float)">lerp
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> target,
float
alpha)
</CODE>
<BR>
Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1].
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#mul(float)">mul
</A></B>(float
scalar)
</CODE>
<BR>
Multiplies this vector by a scalar
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#mul(float, float)">mul
</A></B>(float
x,
float
y)
</CODE>
<BR>
Multiplies this vector by a scalar
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#mul(com.badlogic.gdx.math.Matrix3)">mul
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Matrix3.html" title="class in com.badlogic.gdx.math">Matrix3
</A> mat)
</CODE>
<BR>
Multiplies this vector by the given matrix
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#nor()">nor
</A></B>()
</CODE>
<BR>
Normalizes this vector
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#rotate(float)">rotate
</A></B>(float
degrees)
</CODE>
<BR>
Rotates the Vector2 by the given angle, counter-clockwise.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#set(float, float)">set
</A></B>(float
x,
float
y)
</CODE>
<BR>
Sets the components of this vector
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#set(com.badlogic.gdx.math.Vector2)">set
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</CODE>
<BR>
Sets this vector from the given vector
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#setAngle(float)">setAngle
</A></B>(float
angle)
</CODE>
<BR>
Sets the angle of the vector.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#sub(float, float)">sub
</A></B>(float
x,
float
y)
</CODE>
<BR>
Substracts the other vector from this vector.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#sub(com.badlogic.gdx.math.Vector2)">sub
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</CODE>
<BR>
Substracts the given vector from this vector.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#tmp()">tmp
</A></B>()
</CODE>
<BR>
NEVER EVER SAVE THIS REFERENCE! Do not use this unless you are aware of the side-effects, e.g.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#toString()">toString
</A></B>()
</CODE>
<BR>
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object
</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, finalize, getClass, notify, notifyAll, wait, wait, wait
</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="tmp"><!-- --></A><H3>
tmp
</H3>
<PRE>
public static final
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>tmp
</B></PRE>
<DL>
<DD>Static temporary vector. Use with care! Use only when sure other code will not also use this.
<P>
<DL>
<DT><B>See Also:
</B><DD><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#tmp()"><CODE>tmp()
</CODE></A></DL>
</DL>
<HR>
<A NAME="tmp2"><!-- --></A><H3>
tmp2
</H3>
<PRE>
public static final
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>tmp2
</B></PRE>
<DL>
<DD>Static temporary vector. Use with care! Use only when sure other code will not also use this.
<P>
<DL>
<DT><B>See Also:
</B><DD><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#tmp()"><CODE>tmp()
</CODE></A></DL>
</DL>
<HR>
<A NAME="tmp3"><!-- --></A><H3>
tmp3
</H3>
<PRE>
public static final
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>tmp3
</B></PRE>
<DL>
<DD>Static temporary vector. Use with care! Use only when sure other code will not also use this.
<P>
<DL>
<DT><B>See Also:
</B><DD><A HREF="../../../../com/badlogic/gdx/math/Vector2.html#tmp()"><CODE>tmp()
</CODE></A></DL>
</DL>
<HR>
<A NAME="X"><!-- --></A><H3>
X
</H3>
<PRE>
public static final
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>X
</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="Y"><!-- --></A><H3>
Y
</H3>
<PRE>
public static final
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>Y
</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="Zero"><!-- --></A><H3>
Zero
</H3>
<PRE>
public static final
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>Zero
</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="x"><!-- --></A><H3>
x
</H3>
<PRE>
public float
<B>x
</B></PRE>
<DL>
<DD>the x-component of this vector
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="y"><!-- --></A><H3>
y
</H3>
<PRE>
public float
<B>y
</B></PRE>
<DL>
<DD>the y-component of this vector
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Vector2()"><!-- --></A><H3>
Vector2
</H3>
<PRE>
public
<B>Vector2
</B>()
</PRE>
<DL>
<DD>Constructs a new vector at (0,0)
<P>
</DL>
<HR>
<A NAME="Vector2(float, float)"><!-- --></A><H3>
Vector2
</H3>
<PRE>
public
<B>Vector2
</B>(float
x,
float
y)
</PRE>
<DL>
<DD>Constructs a vector with the given components
<P>
<DL>
<DT><B>Parameters:
</B><DD><CODE>x
</CODE> - The x-component
<DD><CODE>y
</CODE> - The y-component
</DL>
</DL>
<HR>
<A NAME="Vector2(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
Vector2
</H3>
<PRE>
public
<B>Vector2
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</PRE>
<DL>
<DD>Constructs a vector from the given vector
<P>
<DL>
<DT><B>Parameters:
</B><DD><CODE>v
</CODE> - The vector
</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="cpy()"><!-- --></A><H3>
cpy
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>cpy
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>a copy of this vector
</DL>
</DD>
</DL>
<HR>
<A NAME="len()"><!-- --></A><H3>
len
</H3>
<PRE>
public float
<B>len
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>The euclidian length
</DL>
</DD>
</DL>
<HR>
<A NAME="len2()"><!-- --></A><H3>
len2
</H3>
<PRE>
public float
<B>len2
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>The squared euclidian length
</DL>
</DD>
</DL>
<HR>
<A NAME="set(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
set
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>set
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</PRE>
<DL>
<DD>Sets this vector from the given vector
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>v
</CODE> - The vector
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="set(float, float)"><!-- --></A><H3>
set
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>set
</B>(float
x,
float
y)
</PRE>
<DL>
<DD>Sets the components of this vector
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>x
</CODE> - The x-component
<DD><CODE>y
</CODE> - The y-component
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="sub(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
sub
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>sub
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</PRE>
<DL>
<DD>Substracts the given vector from this vector.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>v
</CODE> - The vector
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="nor()"><!-- --></A><H3>
nor
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>nor
</B>()
</PRE>
<DL>
<DD>Normalizes this vector
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="add(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
add
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>add
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</PRE>
<DL>
<DD>Adds the given vector to this vector
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>v
</CODE> - The vector
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="add(float, float)"><!-- --></A><H3>
add
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>add
</B>(float
x,
float
y)
</PRE>
<DL>
<DD>Adds the given components to this vector
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>x
</CODE> - The x-component
<DD><CODE>y
</CODE> - The y-component
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="dot(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
dot
</H3>
<PRE>
public float
<B>dot
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>v
</CODE> - The other vector
<DT><B>Returns:
</B><DD>The dot product between this and the other vector
</DL>
</DD>
</DL>
<HR>
<A NAME="mul(float)"><!-- --></A><H3>
mul
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>mul
</B>(float
scalar)
</PRE>
<DL>
<DD>Multiplies this vector by a scalar
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>scalar
</CODE> - The scalar
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="mul(float, float)"><!-- --></A><H3>
mul
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>mul
</B>(float
x,
float
y)
</PRE>
<DL>
<DD>Multiplies this vector by a scalar
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="div(float)"><!-- --></A><H3>
div
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>div
</B>(float
value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="div(float, float)"><!-- --></A><H3>
div
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>div
</B>(float
vx,
float
vy)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="div(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
div
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>div
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> other)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="dst(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
dst
</H3>
<PRE>
public float
<B>dst
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>v
</CODE> - The other vector
<DT><B>Returns:
</B><DD>the distance between this and the other vector
</DL>
</DD>
</DL>
<HR>
<A NAME="dst(float, float)"><!-- --></A><H3>
dst
</H3>
<PRE>
public float
<B>dst
</B>(float
x,
float
y)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>x
</CODE> - The x-component of the other vector
<DD><CODE>y
</CODE> - The y-component of the other vector
<DT><B>Returns:
</B><DD>the distance between this and the other vector
</DL>
</DD>
</DL>
<HR>
<A NAME="dst2(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
dst2
</H3>
<PRE>
public float
<B>dst2
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>v
</CODE> - The other vector
<DT><B>Returns:
</B><DD>the squared distance between this and the other vector
</DL>
</DD>
</DL>
<HR>
<A NAME="dst2(float, float)"><!-- --></A><H3>
dst2
</H3>
<PRE>
public float
<B>dst2
</B>(float
x,
float
y)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>x
</CODE> - The x-component of the other vector
<DD><CODE>y
</CODE> - The y-component of the other vector
<DT><B>Returns:
</B><DD>the squared distance between this and the other vector
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString
</H3>
<PRE>
public java.lang.String
<B>toString
</B>()
</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:
</B><DD><CODE>toString
</CODE> in class
<CODE>java.lang.Object
</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="sub(float, float)"><!-- --></A><H3>
sub
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>sub
</B>(float
x,
float
y)
</PRE>
<DL>
<DD>Substracts the other vector from this vector.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>x
</CODE> - The x-component of the other vector
<DD><CODE>y
</CODE> - The y-component of the other vector
<DT><B>Returns:
</B><DD>This vector for chaining
</DL>
</DD>
</DL>
<HR>
<A NAME="tmp()"><!-- --></A><H3>
tmp
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>tmp
</B>()
</PRE>
<DL>
<DD>NEVER EVER SAVE THIS REFERENCE! Do not use this unless you are aware of the side-effects, e.g. other methods might call this
as well.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>a temporary copy of this vector. Use with care as this is backed by a single static Vector2 instance. v1.tmp().add(
v2.tmp() ) will not work!
</DL>
</DD>
</DL>
<HR>
<A NAME="mul(com.badlogic.gdx.math.Matrix3)"><!-- --></A><H3>
mul
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>mul
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Matrix3.html" title="class in com.badlogic.gdx.math">Matrix3
</A> mat)
</PRE>
<DL>
<DD>Multiplies this vector by the given matrix
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>mat
</CODE> - the matrix
<DT><B>Returns:
</B><DD>this vector
</DL>
</DD>
</DL>
<HR>
<A NAME="crs(com.badlogic.gdx.math.Vector2)"><!-- --></A><H3>
crs
</H3>
<PRE>
public float
<B>crs
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> v)
</PRE>
<DL>
<DD>Calculates the 2D cross product between this and the given vector.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>v
</CODE> - the other vector
<DT><B>Returns:
</B><DD>the cross product
</DL>
</DD>
</DL>
<HR>
<A NAME="crs(float, float)"><!-- --></A><H3>
crs
</H3>
<PRE>
public float
<B>crs
</B>(float
x,
float
y)
</PRE>
<DL>
<DD>Calculates the 2D cross product between this and the given vector.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>x
</CODE> - the x-coordinate of the other vector
<DD><CODE>y
</CODE> - the y-coordinate of the other vector
<DT><B>Returns:
</B><DD>the cross product
</DL>
</DD>
</DL>
<HR>
<A NAME="angle()"><!-- --></A><H3>
angle
</H3>
<PRE>
public float
<B>angle
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the angle in degrees of this vector (point) relative to the x-axis. Angles are counter-clockwise and between 0 and
360.
</DL>
</DD>
</DL>
<HR>
<A NAME="setAngle(float)"><!-- --></A><H3>
setAngle
</H3>
<PRE>
public void
<B>setAngle
</B>(float
angle)
</PRE>
<DL>
<DD>Sets the angle of the vector.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>angle
</CODE> - The angle to set.
</DL>
</DD>
</DL>
<HR>
<A NAME="rotate(float)"><!-- --></A><H3>
rotate
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>rotate
</B>(float
degrees)
</PRE>
<DL>
<DD>Rotates the Vector2 by the given angle, counter-clockwise.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>degrees
</CODE> - the angle in degrees
</DL>
</DD>
</DL>
<HR>
<A NAME="lerp(com.badlogic.gdx.math.Vector2, float)"><!-- --></A><H3>
lerp
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> <B>lerp
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> target,
float
alpha)
</PRE>
<DL>
<DD>Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1]. The result is stored
in this vector.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>target
</CODE> - The target vector
<DD><CODE>alpha
</CODE> - The interpolation coefficient
<DT><B>Returns:
</B><DD>This vector for chaining.
</DL>
</DD>
</DL>
<HR>
<A NAME="hashCode()"><!-- --></A><H3>
hashCode
</H3>
<PRE>
public int
<B>hashCode
</B>()
</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:
</B><DD><CODE>hashCode
</CODE> in class
<CODE>java.lang.Object
</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals
</H3>
<PRE>
public boolean
<B>equals
</B>(java.lang.Object
obj)
</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:
</B><DD><CODE>equals
</CODE> in class
<CODE>java.lang.Object
</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="epsilonEquals(com.badlogic.gdx.math.Vector2, float)"><!-- --></A><H3>
epsilonEquals
</H3>
<PRE>
public boolean
<B>epsilonEquals
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2
</A> obj,
float
epsilon)
</PRE>
<DL>
<DD>Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>obj
</CODE> -
<DD><CODE>epsilon
</CODE> -
<DT><B>Returns:
</B><DD>whether the vectors are the same.
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Vector2.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><B>PREV CLASS
</B></A>
<A HREF="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/badlogic/gdx/math/Vector2.html" target="_top"><B>FRAMES
</B></A>
<A HREF="Vector2.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
NESTED
|
<A HREF="#field_summary">FIELD
</A> |
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
<A HREF="#field_detail">FIELD
</A> |
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<div style="font-size:9pt"><i>
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</BODY>
</HTML>