FAQ
We have Mat3 and Mat4 types for 3x3 and 4x4 matrices. Should we have
Aff3 and Aff4 types for 3x3 and 4x4 affine matrices, where the bottom
row is implicit?

// Aff3 is a 3x3 matrix in row major order, where the bottom row
// is implicitly [0 0 1].
//
// m[3*r + c] is the element in the r'th row and c'th column.
type Aff3 [6]float64

I say yes. WDYT?

--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Rob Pike at Mar 2, 2015 at 1:41 pm
    Yes.
    On Sun, Mar 1, 2015 at 9:19 PM, Nigel Tao wrote:
    We have Mat3 and Mat4 types for 3x3 and 4x4 matrices. Should we have
    Aff3 and Aff4 types for 3x3 and 4x4 affine matrices, where the bottom
    row is implicit?

    // Aff3 is a 3x3 matrix in row major order, where the bottom row
    // is implicitly [0 0 1].
    //
    // m[3*r + c] is the element in the r'th row and c'th column.
    type Aff3 [6]float64

    I say yes. WDYT?

    --
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Nigel Tao at Mar 3, 2015 at 2:03 am
    This is https://go-review.googlesource.com/6552

    --
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Stephen Gutekanst at Mar 5, 2015 at 1:17 pm
    Sounds like a plan!

    I imagine conversion from Aff4 -> Mat4 will be really common (for example,
    you need a Mat4 to unsafely pass into OpenGL or Direct3D API's). For
    simplicity sake I say leave it out of the package -- but it's an idea to be
    revisited later.

    Will review your CL soon.

    Cheers,
    Stephen
    On Sunday, March 1, 2015 at 10:19:48 PM UTC-7, Nigel Tao wrote:

    We have Mat3 and Mat4 types for 3x3 and 4x4 matrices. Should we have
    Aff3 and Aff4 types for 3x3 and 4x4 affine matrices, where the bottom
    row is implicit?

    // Aff3 is a 3x3 matrix in row major order, where the bottom row
    // is implicitly [0 0 1].
    //
    // m[3*r + c] is the element in the r'th row and c'th column.
    type Aff3 [6]float64

    I say yes. WDYT?
    --
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedMar 2, '15 at 5:19a
activeMar 5, '15 at 1:17p
posts4
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase