Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace linalg and statistics utilities with CBA and BIS functions #368

Merged
merged 1 commit into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class CfgFunctions
file = "\achilles\functions_f_achilles\functions\common";

class sum;
class arrayMean;
class pushBack;
class TextToVariableName;
class HigherConfigHierarchyLevel;
Expand All @@ -29,8 +28,6 @@ class CfgFunctions
class setUnitAmmoDef;
class setVehicleAmmoDef;
class checkLineOfFire2D;
class matrixTranspose;
class vectorMap;
class dikToLetter;
class getCuratorSelected;
class deadlyExplosion;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ private _percentages = [];
// return the mean of all percentages
if (!(_percentages isEqualTo [])) exitWith
{
_percentages call Achilles_fnc_arrayMean
_percentages call BIS_fnc_arithmeticMean
};
0
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private _AllTurretAmmoPercentages = [];

if (!(_TurretAmmoPercentages isEqualTo [])) then
{
_AllTurretAmmoPercentages pushBack (_TurretAmmoPercentages call Achilles_fnc_arrayMean);
_AllTurretAmmoPercentages pushBack (_TurretAmmoPercentages call BIS_fnc_arithmeticMean);
};

} forEach _turretsCfg;
Expand All @@ -76,13 +76,13 @@ if (isClass (configFile >> "cfgVehicles" >> _vehicleType >> "Components" >> "Tra
};
};
} forEach (getPylonMagazines _vehicle);
_AllTurretAmmoPercentages pushBack (_TurretAmmoPercentages call Achilles_fnc_arrayMean);
_AllTurretAmmoPercentages pushBack (_TurretAmmoPercentages call BIS_fnc_arithmeticMean);
};


// return the overall mean of all percentages
if (!(_AllTurretAmmoPercentages isEqualTo [])) exitWith
{
_AllTurretAmmoPercentages call Achilles_fnc_arrayMean
_AllTurretAmmoPercentages call BIS_fnc_arithmeticMean
};
0

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private _group_attributes = [];
private _vector_center_object = _object_pos vectorDiff _center_pos;
private _attributes = [_vector_center_object, vectorDir _object, vectorUp _object] apply
{
private _return = [_standard_to_internal, _x] call Achilles_fnc_vectorMap;
private _return = [_standard_to_internal, _x] call CBA_fnc_vectMap3D;
_return;
};
_group_attributes pushBack ([_object] + _attributes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ switch (true) do

// define transformation matrix
private _standard_to_internal = [_vector_dir, _vector_up, _vector_perpendicular];
private _internal_to_standard = [_standard_to_internal] call Achilles_fnc_matrixTranspose;
private _internal_to_standard = [_standard_to_internal] call CBA_fnc_matrixTranspose;

{
_x params ["_object"];

// reposition
private _vector_center_object = [_internal_to_standard, _x select 1] call Achilles_fnc_vectorMap;
private _vector_center_object = [_internal_to_standard, _x select 1] call CBA_fnc_vectMap3D;
_object setPosWorld (_vector_center_object vectorAdd _center_pos);

// reorientation
private _vectors_dir_up = (_x select [2,2]) apply { [_internal_to_standard, _x] call Achilles_fnc_vectorMap; };
private _vectors_dir_up = (_x select [2,2]) apply { [_internal_to_standard, _x] call CBA_fnc_vectMap3D; };

[_object ,_vectors_dir_up] remoteExec ["setVectorDirAndUp",0,_object];

Expand Down