mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-29 07:16:33 +08:00
docs(skill): add MathUtilities → MathUtils migration guide to Avalonia 12 skill
- Document that Avalonia.Utilities.MathUtilities is now internal in Avalonia 12 - Add detection pattern for MathUtilities usage - Document fix: use AtomUI.Utils.MathUtils as public wrapper - Explain that MathUtils provides identical epsilon-based floating-point comparison methods
This commit is contained in:
@@ -1139,6 +1139,7 @@ var args = ResourcesChangedEventArgs.Create();
|
||||
```csharp
|
||||
Gestures.TappedEvent
|
||||
Gestures.DoubleTappedEvent
|
||||
Gestures.ScrollGestureEndedEvent
|
||||
```
|
||||
|
||||
**Fix:**
|
||||
@@ -1148,8 +1149,33 @@ Gestures.DoubleTappedEvent
|
||||
```csharp
|
||||
InputElement.TappedEvent
|
||||
InputElement.DoubleTappedEvent
|
||||
InputElement.ScrollGestureEndedEvent
|
||||
```
|
||||
|
||||
#### 28.1. MathUtilities Class Now Internal (MEDIUM)
|
||||
|
||||
**What changed:** `Avalonia.Utilities.MathUtilities` class is now `internal`. All floating-point comparison methods (`AreClose`, `LessThan`, `GreaterThan`, `IsZero`, `IsOne`, etc.) are no longer accessible from external assemblies.
|
||||
|
||||
**Detection:**
|
||||
```csharp
|
||||
using Avalonia.Utilities;
|
||||
|
||||
if (MathUtilities.AreClose(value1, value2))
|
||||
if (MathUtilities.LessThan(a, b))
|
||||
if (MathUtilities.IsZero(value))
|
||||
```
|
||||
|
||||
**Fix:**
|
||||
```csharp
|
||||
using AtomUI.Utils;
|
||||
|
||||
if (MathUtils.AreClose(value1, value2))
|
||||
if (MathUtils.LessThan(a, b))
|
||||
if (MathUtils.IsZero(value))
|
||||
```
|
||||
|
||||
**Why:** AtomUI provides `AtomUI.Utils.MathUtils` as a public wrapper around the internal `MathUtilities` class. This class contains the same floating-point comparison methods with identical epsilon-based logic. Use `MathUtils` instead of attempting to access the internal `MathUtilities` via reflection.
|
||||
|
||||
#### 29. Window.WindowState (MEDIUM)
|
||||
|
||||
**What changed:** Now a direct property, not styled property. Can't set from style.
|
||||
|
||||
Reference in New Issue
Block a user