-
-
Notifications
You must be signed in to change notification settings - Fork 9
Vector2f
Vector2f represents the type of a two float vector.
| Type | Size | Memory Management Model | File |
|---|---|---|---|
Vector2f |
8 bytes | None | 2.7/Vector2f.adept |
struct Vector2f (x, y float)
| Name | Type | Description |
|---|---|---|
x |
float |
X Value |
y |
float |
Y Value |
func __add__(a POD Vector2f, b POD Vector2f) Vector2ffunc __subtract__(a POD Vector2f, b POD Vector2f) Vector2ffunc __multiply__(a POD Vector2f, b POD Vector2f) Vector2ffunc __multiply__(a POD Vector2f, factor float) Vector2f
-
func Vector2f(x, y float) Vector2fConstructs a
Vector2f. -
func vector2f(x, y float) Vector2fConstructs a
Vector2f.
-
func zero(this *Vector2f) voidSets all components of a vector to zero.
-
func set(this *Vector2f, x, y float) voidSets the components of a vector.
-
func set(this *Vector2f, other Vector2f) voidSets the components of a vector to those of another.
-
func add(this *Vector2f, other Vector2f) voidAdds the components of a vector to another.
-
func subtract(this *Vector2f, other Vector2f) voidSubtracts the components of a vector from another.
-
func multiply(this *Vector2f, other Vector2f) voidMultiplies the components of a vector by another.
-
func negate(this *Vector2f) voidNegates the components of a vector.
-
func negated(this *Vector2f) Vector2fReturns a negated copy of a vector.
-
func scale(this *Vector2f, amount float) voidScales a vector by a scalar.
-
func normalize(this *Vector2f) voidNormalizes a vector.
-
func cross(this *Vector2f, other Vector2f) floatCalculates the cross-product of two vectors.
-
func length(this *Vector2f) floatCalculates the length of a vector.
-
func dot(this *Vector2f, other Vector2f) floatCalculates the dot product of two vectors.
-
func lerp(this *Vector2f, other Vector2f, lerp float) voidLinearly interpolates between two vectors by
lerp[0.0, 1.0] amount. -
func lerp(this *Vector2f, other Vector2f) voidLinearly interpolates halfway between two vectors.
-
func distance(this *Vector2f, other Vector2f) floatCalculates the distance between two points.
-
func toString(this *Vector2f) StringConverts a vector to a
String. -
func print(this *Vector2f) voidPrints a vector to stdout.