# Distance Squared Between Points
Grammar — Distance squared between p1|Point and p2|Point
Flags —Native
|Function
Returns the squared distance between two points as a real value.
# Arguments
point
— Point 1point
— Point 2
Returns — fixed
native fixed DistanceSquaredBetweenPoints(
point p1,
point p2,
);
# Related
Category: Point / Measurements
- X Of Point —
fixed
— PointGetX - Y Of Point —
fixed
— PointGetY - Facing Angle Of Point —
fixed
— PointGetFacing - Height Of Point —
fixed
— PointGetHeight - Angle Between Points —
fixed
— AngleBetweenPoints - Distance Between Points —
fixed
— DistanceBetweenPoints - Distance Squared Between Points —
fixed
— DistanceSquaredBetweenPoints - Point Is In Region —
bool
— RegionContainsPoint
# Examples
mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod — base.stormdata/LibPVEB.galaxy:1677
// Automatic Variable Declarations
// Implementation
return (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex2) >= (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex3) + DistanceSquaredBetweenPoints(lp_minionIndex2, lp_minionIndex3)));
}
mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod — base.stormdata/LibPVEB.galaxy:1677
// Automatic Variable Declarations
// Implementation
return (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex2) >= (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex3) + DistanceSquaredBetweenPoints(lp_minionIndex2, lp_minionIndex3)));
}
mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod — base.stormdata/LibPVEB.galaxy:1677
// Automatic Variable Declarations
// Implementation
return (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex2) >= (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex3) + DistanceSquaredBetweenPoints(lp_minionIndex2, lp_minionIndex3)));
}
mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod — base.stormdata/LibPVEM.galaxy:348
// Automatic Variable Declarations
// Implementation
return (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex2) >= (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex3) + DistanceSquaredBetweenPoints(lp_minionIndex2, lp_minionIndex3)));
}
mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod — base.stormdata/LibPVEM.galaxy:348
// Automatic Variable Declarations
// Implementation
return (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex2) >= (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex3) + DistanceSquaredBetweenPoints(lp_minionIndex2, lp_minionIndex3)));
}
mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod — base.stormdata/LibPVEM.galaxy:348
// Automatic Variable Declarations
// Implementation
return (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex2) >= (DistanceSquaredBetweenPoints(lp_minionIndex, lp_minionIndex3) + DistanceSquaredBetweenPoints(lp_minionIndex2, lp_minionIndex3)));
}
mods/heroesmapmods/battlegroundmapmods/volskayadata.stormmod — base.stormdata/LibVolV.galaxy:80
// Implementation
while ((libGame_gv_gameOver == false) && (UnitIsValid(lp_gunnerUnit) == true) && (UnitIsAlive(lp_gunnerUnit) == true) && (UnitIsAlive(lv_pilotUnit) == true)) {
if ((DistanceSquaredBetweenPoints(UnitGetPosition(EventUnit()), UnitGetPosition(EventUnit())) >= (lv_gunnerBlendDistance * lv_gunnerBlendDistance))) {
UnitSetPosition(lp_gunnerUnit, UnitGetPosition(lv_pilotUnit), false);
}