• @TransformScale decorator applies a scaling transformation to the decorated property value during the binary reading or writing phase. The decorator multiplies the value by the given scale factor when reading and divides it by the same factor when writing, ensuring symmetry.

    Type Parameters

    • This

      The type of the class the decorator is applied to.

    • Value

      The type of the decorated property.

    Parameters

    • scale: number

      The scaling factor to apply.

    • Optionalopt: Partial<TransformerOptions>

      Optional configuration.

    Returns DecoratorType<This, Value>

    The property decorator function.