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