Browse Source

Add NotNullWhen to TryGetLinearlySeparableComponents

pull/2312/head
Stefan Nikolei 3 years ago
parent
commit
9debbe17ac
  1. 4
      src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessorHelpers.cs

4
src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessorHelpers.cs

@ -1,6 +1,8 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System.Diagnostics.CodeAnalysis;
namespace SixLabors.ImageSharp.Processing.Processors.Convolution;
internal static class ConvolutionProcessorHelpers
@ -98,7 +100,7 @@ internal static class ConvolutionProcessorHelpers
/// <param name="row">The resulting 1D row vector, if possible.</param>
/// <param name="column">The resulting 1D column vector, if possible.</param>
/// <returns>Whether or not <paramref name="matrix"/> was linearly separable.</returns>
public static bool TryGetLinearlySeparableComponents(this DenseMatrix<float> matrix, out float[]? row, out float[]? column)
public static bool TryGetLinearlySeparableComponents(this DenseMatrix<float> matrix, [NotNullWhen(true)] out float[]? row, [NotNullWhen(true)] out float[]? column)
{
int height = matrix.Rows;
int width = matrix.Columns;

Loading…
Cancel
Save