github.com/gopherd/gonum@v0.0.4/spatial/r3/deprecated.go (about)

     1  // Copyright ©2021 The Gonum Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package r3
     6  
     7  // TODO(sbinet): remove this file for Gonum-v0.10.0.
     8  
     9  // Add returns the vector sum of p and q.
    10  //
    11  // DEPRECATED: use r3.Add.
    12  func (p Vec) Add(q Vec) Vec {
    13  	return Add(p, q)
    14  }
    15  
    16  // Sub returns the vector sum of p and -q.
    17  //
    18  // DEPRECATED: use r3.Sub.
    19  func (p Vec) Sub(q Vec) Vec {
    20  	return Sub(p, q)
    21  }
    22  
    23  // Scale returns the vector p scaled by f.
    24  //
    25  // DEPRECATED: use r3.Scale.
    26  func (p Vec) Scale(f float64) Vec {
    27  	return Scale(f, p)
    28  }
    29  
    30  // Dot returns the dot product p·q.
    31  //
    32  // DEPRECATED: use r3.Dot.
    33  func (p Vec) Dot(q Vec) float64 {
    34  	return Dot(p, q)
    35  }
    36  
    37  // Cross returns the cross product p×q.
    38  //
    39  // DEPRECATED: use r3.Cross.
    40  func (p Vec) Cross(q Vec) Vec {
    41  	return Cross(p, q)
    42  }
    43  
    44  // Rotate returns a new vector, rotated by alpha around the provided axis.
    45  //
    46  // DEPRECATED: use r3.Rotate
    47  func (p Vec) Rotate(alpha float64, axis Vec) Vec {
    48  	return Rotate(p, alpha, axis)
    49  }