Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

MatrixH(float[] elements) throws IndexOutOfRangeException when float[9] #2207

Open
@MathiasGlana

Description

@MathiasGlana

What would you like to submit? (put an 'x' inside the bracket that applies)

  • question
  • bug report
  • feature request

Issue description

public MatrixH(float[] elements) throws a IndexOutOfRangeException when elements is 9 elements long.
Sample code

MatrixH(new float[9] {1, 0, 0, 0, 1, 0, 0, 0, 1}); // gives IndexOutOfRangeException 
else if (elements.Length == 9)
{
    this.elements = new float[8];
    for (int i = 0; i < elements.Length; i++)
    this.elements[i] = (float)(elements[i] / elements[8]);
}

should be

else if (elements.Length == 9)
{
    this.elements = new float[8];
    for (int i = 0; i < this.elements.Length; i++)
    this.elements[i] = (float)(elements[i] / elements[8]);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions