Dot

Dot

Source:

Methods

(static) dot(a1, a2, b1, b2) → {String|PropertyObject}

Source:
The dot product of a1 and a2 for the b1 and b2.
Example
dot(1, 3, 0.3, 0.7);
// => 1.6
Parameters:
Name Type Description
a1 String | Number | PropertyObject value1
a2 String | Number | PropertyObject value2
b1 Number b1 ratio
b2 Number b2 ratio
Returns:
  • Not Array, Not Separator, Only Number & Unit
    Type
    String
  • Array with Separator.
    Type
    PropertyObject

(static) dotArray(a1, a2, b1, b2) → {Array|Object}

Source:
The dot product of Arrays
Example
dotArray([0, 0, 0, 1],[50, 50, 50, 1],0.5, 0.5);
// => [25, 25, 25, 1]
Parameters:
Name Type Description
a1 Array value1
a2 Array value2
b1 Number b1 ratio
b2 Number b2 ratio
Returns:
Array.
Type
Array | Object

(static) dotColor(a1, a2, b1, b2) → {PropertyObject}

Source:
The dot product of PropertyObject(type=color) If the values are not RGBA model, change them RGBA mdoel.
Example
var colorObject = ......; //PropertyObject(type=color, model="rgba", value=[254, 254, 254, 1]);
dotColor("#000",  colorObject, 0.5, 0.5);
// "#000" => PropertyObject(type=color, model="rgba", value=[0, 0, 0, 1]);
// return => PropertyObject(type=color, model="rgba", value=[127, 127, 127, 1]);
Parameters:
Name Type Description
a1 PropertyObject | String value1
a2 PropertyObject | String value2
b1 Number b1 ratio
b2 Number b2 ratio
Returns:
PropertyObject(type=color).
Type
PropertyObject

(static) dotObject(a1, a2, b1, b2) → {PropertyObject}

Source:
The dot product of Objects
Example
dotObject(PropertyObject(["1px", "solid", rgba(0, 0, 0, 1)]),
PropertyObject(["9px", "solid", rgba(50, 50, 50, 1)]),
0.5, 0.5);
// => PropertyObject(["5px", "solid", rgba(25, 25, 25, 1)])
Parameters:
Name Type Description
a1 PropertyObject value1
a2 PropertyObject value2
b1 Number b1 ratio
b2 Number b2 ratio
Returns:
Array with Separator.
Type
PropertyObject