‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
math_shared.csc File Reference

Go to the source code of this file.

Functions

function angle_dif (oldangle, newangle)
 
function array_average (array)
 
function array_std_deviation (array, mean)
 
function clamp (val, val_min, val_max)
 
function cointoss ()
 
function lag (desired, curr, k, dt)
 
function linear_map (num, min_a, max_a, min_b, max_b)
 
function random_vector (max_length)
 
function sign (x)
 
function vector_compare (vec1, vec2)
 

Function Documentation

◆ angle_dif()

function angle_dif ( oldangle  ,
newangle   
)

Definition at line 154 of file math_shared.csc.

◆ array_average()

function array_average ( array  )

Description:
"Function Name: array_average( <array> )"
"Summary: Given an array of numbers, returns the average (mean) value of the array" "Module: Utility"
"Mandatory Argument(s): <array>: the array of numbers which will be averaged"
"Example:array_average( numbers );"
"Single Player / Multi Player: both"

Definition at line 86 of file math_shared.csc.

References array.

Referenced by set_rank().

◆ array_std_deviation()

function array_std_deviation ( array  ,
mean   
)

Description:
"Function Name: array_std_deviation( <array>, <mean> )"
"Summary: Given an array of numbers and the average of the array, returns the standard deviation value of the array" "Module: Utility"
"Mandatory Argument(s): <array>: the array of numbers"
"Mandatory Argument(s): <mean>: the average (mean) value of the array"
"Example:array_std_deviation( numbers, avg );"
"Single Player / Multi Player: both"

Definition at line 111 of file math_shared.csc.

References array.

Referenced by set_rank().

◆ clamp()

function clamp ( val  ,
val_min  ,
val_max   
)

◆ cointoss()

◆ lag()

function lag ( desired  ,
curr  ,
,
dt   
)

Description:
"Function Name: lag(desired, curr, k, dt)"
"Summary: Changes a value from current to desired using 1st order differential lag." "Module: Math"
"Mandatory Argument(s): desired: desired value."
"Mandatory Argument(s): curr: the current value."
"Mandatory Argument(s): k: the strength of the lag ( lower = slower, higher = faster)."
"Mandatory Argument(s): dt: time step to lag over ( usually 1 server frame )."
"Example:speed = lag(max_speed, speed, 1, 0.05);"
"Single Player / Multi Player: both"

Definition at line 60 of file math_shared.csc.

◆ linear_map()

function linear_map ( num  ,
min_a  ,
max_a  ,
min_b  ,
max_b   
)

Description:
"Function Name: linear_map(val, min_a, max_a, min_b, max_b)"
"Summary: Maps a value within one range to a value in another range." "Module: Math"
"Mandatory Argument(s): val: the value to map."
"Mandatory Argument(s): min_a: the min value of the range in which <val> exists."
"Mandatory Argument(s): max_a: the max value of the range in which <val> exists."
"Mandatory Argument(s): min_b: the min value of the range in which the return value should exist."
"Mandatory Argument(s): max_b: the max value of the range in which the return value should exist."
"Example:fov = linear_map(speed, min_speed, max_speed, min_fov, max_fov);"
"Single Player / Multi Player: both"

Definition at line 43 of file math_shared.csc.

References clamp().

Referenced by electric_cherry_reload_attack(), and pulse_damage().

◆ random_vector()

function random_vector ( max_length  )

Definition at line 149 of file math_shared.csc.

◆ sign()

◆ vector_compare()

function vector_compare ( vec1  ,
vec2   
)

Description:
"Function Name: vector_compare( <vec1>, <vec2> )"
"Summary: For 3D vectors. Returns true if the vectors are the same"
"Mandatory Argument(s): <vec1> : A 3D vector (origin)"
"Mandatory Argument(s): <vec2> : A 3D vector (origin)"
"Example:if (vector_compare(self.origin, node.origin){print(\"yay, i'm on the node!");}" <br/>"Single Player / Multi Player: both"

Definition at line 144 of file math_shared.csc.