public Quark(QuarkType quarkType, QuarkOrdinal quarkOrdinal, double radius, double velocityAngleFromRadius) : base(radius, velocityAngleFromRadius) { QuarkType = quarkType; QuarkOrdinal = quarkOrdinal; switch (QuarkType) { case QuarkType.Up: ChargeRatio = TWO_THIRDS; break; case QuarkType.Down: ChargeRatio = -ONE_THIRD; break; } switch (quarkOrdinal) { case QuarkOrdinal.One: ChargeFunction = new ChargeFunctionHandler(TypeOneChargeFunction); break; case QuarkOrdinal.Two: ChargeFunction = new ChargeFunctionHandler(TypeTwoChargeFunction); break; case QuarkOrdinal.Three: ChargeFunction = new ChargeFunctionHandler(TypeThreeChargeFunction); break; } BuildPoints(); }
private Quark(QuarkType type, ElectricCharge ec, Spin spin, Energy e, QuarkWeakType weakType, bool isAnti) { this._type = type; this._electricCharge = ec; this._spin = spin; this._entryMass = e; this._weakType = weakType; this._isAntiQuark = isAnti; this._naturalMass = new Mass((e.ElectronVolts * SpeedOfLightSquared) / ElectronMassPlank, MassUnit.Kilogram); }
internal static string GetNameByType(QuarkType type) => names[type];