Class PointF
Inheritance
System.Object
PointF
Assembly: BonEngineSharp.dll
Syntax
public sealed class PointF : ValueType, IEquatable<PointF>
Constructors
PointF(Single, Single)
Declaration
public PointF(float x = 0F, float y = 0F)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Fields
Half
Point with value 0.5, 0.5.
Declaration
public static readonly PointF Half
Field Value
One
Declaration
public static readonly PointF One
Field Value
X
X component of the point.
Declaration
Field Value
| Type |
Description |
| System.Single |
|
Y
Y component of the point.
Declaration
Field Value
| Type |
Description |
| System.Single |
|
Zero
Declaration
public static readonly PointF Zero
Field Value
Properties
Magnitude
Declaration
public float Magnitude { get; }
Property Value
| Type |
Description |
| System.Single |
|
Methods
Add(PointF)
Declaration
public PointF Add(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
Add(Single)
Declaration
public PointF Add(float scalar)
Parameters
| Type |
Name |
Description |
| System.Single |
scalar |
|
Returns
Add(Single, Single)
Declaration
public PointF Add(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Returns
AddSelf(PointF)
Declaration
public PointF AddSelf(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
AddSelf(Single)
Declaration
public PointF AddSelf(float scalar)
Parameters
| Type |
Name |
Description |
| System.Single |
scalar |
|
Returns
AddSelf(Single, Single)
Declaration
public PointF AddSelf(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Returns
Clone()
Declaration
Returns
DistanceTo(PointF)
Get distance to another point.
Declaration
public float DistanceTo(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
| Type |
Description |
| System.Single |
|
Divide(PointF)
Divide point with a point.
Declaration
public PointF Divide(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
Divide(Single)
Divide point with a scalar.
Declaration
public PointF Divide(float scalar)
Parameters
| Type |
Name |
Description |
| System.Single |
scalar |
|
Returns
Divide(Single, Single)
Divide point with a point.
Declaration
public PointF Divide(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Returns
DivideSelf(PointF)
Divide point with a point.
Declaration
public PointF DivideSelf(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
DivideSelf(Single)
Divide point with a scalar.
Declaration
public PointF DivideSelf(float scalar)
Parameters
| Type |
Name |
Description |
| System.Single |
scalar |
|
Returns
DivideSelf(Single, Single)
Divide point with a point.
Declaration
public PointF DivideSelf(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Returns
Equals(PointF)
Check if this point equals to another point.
Declaration
public bool Equals(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
| Type |
Description |
| System.Boolean |
|
Equals(Object)
Check if this point equals to another object.
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Boolean |
|
FromAngle(Int32)
Convert direction in degrees to Point.
Declaration
public static PointF FromAngle(int directionDegrees)
Parameters
| Type |
Name |
Description |
| System.Int32 |
directionDegrees |
|
Returns
FromString(String)
Create point from string.
Declaration
public static PointF FromString(string str)
Parameters
| Type |
Name |
Description |
| System.String |
str |
String to parse, must be in format "x,y".
|
Returns
| Type |
Description |
| PointF |
Point instance.
|
GetHashCode()
Implement hash code of point.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| System.Int32 |
|
Lerp(PointF, PointF, Single)
Declaration
public static PointF Lerp(PointF a, PointF b, float delta)
Parameters
| Type |
Name |
Description |
| PointF |
a |
From point.
|
| PointF |
b |
To point.
|
| System.Single |
delta |
Lerp factor.
|
Returns
| Type |
Description |
| PointF |
Lerped point.
|
Multiply(PointF)
Multiply point with a point.
Declaration
public PointF Multiply(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
Multiply(Single)
Multiply point with a scalar.
Declaration
public PointF Multiply(float scalar)
Parameters
| Type |
Name |
Description |
| System.Single |
scalar |
|
Returns
Multiply(Single, Single)
Multiply point with a point.
Declaration
public PointF Multiply(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Returns
MultiplySelf(PointF)
Multiply point with a point.
Declaration
public PointF MultiplySelf(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
MultiplySelf(Single)
Multiply point with a scalar.
Declaration
public PointF MultiplySelf(float scalar)
Parameters
| Type |
Name |
Description |
| System.Single |
scalar |
|
Returns
MultiplySelf(Single, Single)
Multiply point with a point.
Declaration
public PointF MultiplySelf(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Returns
Normalize()
Normalize this point value.
Declaration
Rotate(Single)
Declaration
public PointF Rotate(float angle)
Parameters
| Type |
Name |
Description |
| System.Single |
angle |
|
Returns
RotateSelf(Single)
Declaration
public PointF RotateSelf(float angle)
Parameters
| Type |
Name |
Description |
| System.Single |
angle |
|
Returns
Set(Single, Single)
Declaration
public void Set(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Substract(PointF)
Substract point with a point.
Declaration
public PointF Substract(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
Substract(Single)
Substract point with a scalar.
Declaration
public PointF Substract(float scalar)
Parameters
| Type |
Name |
Description |
| System.Single |
scalar |
|
Returns
Substract(Single, Single)
Substract point with a point.
Declaration
public PointF Substract(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Returns
SubstractSelf(PointF)
Substract point with a point.
Declaration
public PointF SubstractSelf(PointF other)
Parameters
| Type |
Name |
Description |
| PointF |
other |
|
Returns
SubstractSelf(Single)
Substract point with a scalar.
Declaration
public PointF SubstractSelf(float scalar)
Parameters
| Type |
Name |
Description |
| System.Single |
scalar |
|
Returns
SubstractSelf(Single, Single)
Substract point with a point.
Declaration
public PointF SubstractSelf(float x, float y)
Parameters
| Type |
Name |
Description |
| System.Single |
x |
|
| System.Single |
y |
|
Returns
ToAngle()
Declaration
Returns
| Type |
Description |
| System.Int16 |
|
Operators
Equality(PointF, PointF)
Declaration
public static bool operator ==(PointF obj1, PointF obj2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Implicit(PointF to PointI)
Implicit conversion to pointI.
Declaration
public static implicit operator PointI(PointF p)
Parameters
| Type |
Name |
Description |
| PointF |
p |
|
Returns
Inequality(PointF, PointF)
Declaration
public static bool operator !=(PointF obj1, PointF obj2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Implements
System.IEquatable<>