# Distance Squared Between Points

Grammar — Distance squared between p1|Point and p2|Point
FlagsNative | Function

Returns the squared distance between two points as a real value.

# Arguments

  • point — Point 1
  • point — Point 2

Returns — fixed

native fixed DistanceSquaredBetweenPoints(
	point p1,
	point p2,
);

Category: Point / Measurements

# Examples

mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmodbase.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.stormmodbase.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.stormmodbase.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.stormmodbase.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.stormmodbase.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.stormmodbase.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.stormmodbase.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);
        }