C# Class monoshrub.Vector

显示文件 Open project: threerings/monoshrub Class Usage Examples

Public Properties

Property Type Description
x float
y float

Public Methods

Method Description
Add ( Vector other ) : Vector
Add ( float x, float y ) : Vector
AddScaled ( Vector other, float v ) : Vector
AngleBetween ( Vector other ) : float
Distance ( Vector other ) : float
DistanceSq ( Vector other ) : float
Dot ( Vector other ) : float
Lerp ( Vector other, float t, Vector result ) : Vector
Negate ( ) : Vector
Normalize ( ) : Vector
Rotate ( float angle ) : Vector
RotateAndAdd ( float angle, Vector add ) : Vector
RotateScaleAndAdd ( float angle, float scale, Vector add ) : Vector
Scale ( Vector other ) : Vector
Scale ( float v ) : Vector
Subtract ( Vector other ) : Vector
ToString ( ) : string
Vector ( float x, float y ) : System

Method Details

Add() public method

public Add ( Vector other ) : Vector
other Vector
return Vector

Add() public method

public Add ( float x, float y ) : Vector
x float
y float
return Vector

AddScaled() public method

public AddScaled ( Vector other, float v ) : Vector
other Vector
v float
return Vector

AngleBetween() public method

public AngleBetween ( Vector other ) : float
other Vector
return float

Distance() public method

public Distance ( Vector other ) : float
other Vector
return float

DistanceSq() public method

public DistanceSq ( Vector other ) : float
other Vector
return float

Dot() public method

public Dot ( Vector other ) : float
other Vector
return float

Lerp() public method

public Lerp ( Vector other, float t, Vector result ) : Vector
other Vector
t float
result Vector
return Vector

Negate() public method

public Negate ( ) : Vector
return Vector

Normalize() public method

public Normalize ( ) : Vector
return Vector

Rotate() public method

public Rotate ( float angle ) : Vector
angle float
return Vector

RotateAndAdd() public method

public RotateAndAdd ( float angle, Vector add ) : Vector
angle float
add Vector
return Vector

RotateScaleAndAdd() public method

public RotateScaleAndAdd ( float angle, float scale, Vector add ) : Vector
angle float
scale float
add Vector
return Vector

Scale() public method

public Scale ( Vector other ) : Vector
other Vector
return Vector

Scale() public method

public Scale ( float v ) : Vector
v float
return Vector

Subtract() public method

public Subtract ( Vector other ) : Vector
other Vector
return Vector

ToString() public method

public ToString ( ) : string
return string

Vector() public method

public Vector ( float x, float y ) : System
x float
y float
return System

Property Details

x public_oe property

public float x
return float

y public_oe property

public float y
return float