Class FeedbackScaler
Pure scaling policy applied to every impulse before it reaches a channel: it honours the global "enabled" switch and the global intensity multiplier. Keeping this logic here (engine-free) makes it directly unit-testable and the single place where the "vibration off" / accessibility scaling rules live.
Inherited Members
Namespace: Serenity.Feedback.Domain.Services
Assembly: Serenity.Feedback.Domain.dll
Syntax
public static class FeedbackScaler
Methods
Scale(FeedbackIntensity, float, bool)
Scales an impulse by the global intensity, or zeroes it when feedback is disabled.
Declaration
public static FeedbackIntensity Scale(FeedbackIntensity intensity, float globalIntensity, bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| FeedbackIntensity | intensity | The authored impulse. |
| float | globalIntensity | Global multiplier (0..1); values outside the range are clamped. |
| bool | enabled | When false, the result is silent regardless of intensity. |
Returns
| Type | Description |
|---|---|
| FeedbackIntensity | The scaled impulse, preserving the original duration. |