-
-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
VelcroPhysics.Dynamics.Body
_xf is strange and it may be abbreviation of XForm which is similiar to Transform .In addition,variable names beginning with an underscore is not compliant with the CLS.
public class Body
{
public Transform _xf; // the body origin transform
}Suggest :
public class Body
{
public Transform Transform; // the body origin transform
}VelcroPhysics.Dynamics.TimeStep
In general,a public variable should be full word.
public struct TimeStep
{
public float dt;
public float dtRatio;
public float inv_dt;
}Suggest :
public struct TimeStep
{
public float DeltaTime;
public float DeltaTimeRatio;
public float InverseDeltaTime;
}VelcroPhysics.Shared.Rot
Rot doesn't name with a full noun,and fields s,c lead to confusion.
public struct Rot
{
public float s,c;
}Suggest:
public struct Rotation
{
public float SinValue;
public float CosValue;
}VelcroPhysics.Shared.Transform
Likewise,the meanings of p and q are not clearly.
public struct Transform
{
public Vector2 p;
public Rot q;
}Suggest :
public struct Transform
{
public Vector2 Position;
public Rotation Rotation;
}Metadata
Metadata
Assignees
Labels
No labels