Skip to content

Commit a26044c

Browse files
Refactor physics relationship calculations in the Semantics library to resolve operator ambiguities and enhance clarity. Update the Force and Length operators to distinguish between work/energy and torque calculations, introducing explicit methods for torque. Clean up unused variables and improve documentation for better usability. This update strengthens the library's framework for accurate physical quantity calculations in .NET applications.
1 parent 53c40f8 commit a26044c

19 files changed

Lines changed: 898 additions & 90 deletions

.cursor/rules/derived-cursor-rules.mdc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ When adding XML documentation comments:
390390
[System.Diagnostics.CodeAnalysis.SuppressMessage("Major Code Smell", "CA2225:Provide named alternates for operator overloads", Justification = "Physics relationship operators represent fundamental equations, not arithmetic")]
391391
```
392392
* When performing integrations/derivations and both sides of the operation are physical quantities, they will both already be stored in the SI base unit for their physical dimension, so we dont need to convert them back to concrete numeric types before doing the operation, until the formula depends on a culculation thats not in an SI base unit.
393-
* When performing integrations/derivations and both sides of the operation are physical quantities, they will both already be stored in the SI base unit for their physical dimension, so we dont need to convert them back to concrete numeric types before doing the operation, until the formula depends on a culculation thats not in an SI base unit. Even further than that, you can use the multiply and divide operators on the PhysicalQuantity derived types directly.
393+
* When performing integrations/derivations and both sides of the operation are physical quantities, they will both already be stored in the SI base unit for their physical dimension, so we dont need to convert them back to concrete numeric types before doing the operation. Even further than that, you can use the multiply and divide operators on the PhysicalQuantity derived types directly.
394394
* When implementing physics relationships:
395-
* Use the `.
395+
* Use the `.Value` property directly instead of performing unit conversions.
396+
* Suppress CA2

0 commit comments

Comments
 (0)