Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVecInt Abs | Absolute values. |
| └ indexed: TMtxVecInt Abs(Int32 Index, Int32 Len) | ||
| 2 | TMtxVecInt Abs(TMtxVecInt Src) | Absolute values of all Src vector elements. |
| └ indexed: TMtxVecInt Abs(TMtxVecInt Src, Int32 SrcIndex, Int32 Index, Int32 Len) |
Overload 1: TMtxVecInt Abs
Absolute values.
Result: stored in self (calling object), returns self for chaining
Calculate the absolute value of all calling object elements in-place.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TMtxInt a;
MtxVecInt.CreateIt(out a);
try
{
a.SetIt(new int[] {1,-2,3,4});
a.Abs(); // a = [1,2,3,4]
}
finally
{
MtxVecInt.FreeIt(ref a);
}
}
}
Indexed: TMtxVecInt Abs(Int32 Index, Int32 Len)
Absolute values of calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Returns: calling vector elements [Index]..[Index+Len-1] ansolute vslues.
An exception is raised if array borders are overrun/underrun.
Note
Please note the calling vector elements [Index]..[Index+Len-1] are overwritten with result of routine call.
Overload 2: TMtxVecInt Abs(TMtxVecInt Src)
Absolute values of all Src vector elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt | source TVecInt or TMtxInt |
Result: stored in self (calling object), returns self for chaining
Returns: Src vector elements ansolute vslues.
Indexed: TMtxVecInt Abs(TMtxVecInt Src, Int32 SrcIndex, Int32 Index, Int32 Len)
Absolute values of Src vector elements [VecIndex]..[VecIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | SrcIndex | Int32 | source start index |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Returns: Src vector elements [VecIndex]..[VecIndex+Len-1] absolute values in calling vector elements [Index]..[Index+Len-1].
An exception is raised if array borders are overrun/underrun.
Note
Please note the calling vector elements [Index]..[Index+Len-1] are overwritten with result of routine call.