Scratch for Java

Sprite::distanceToSprite()

Calculates the Euclidean distance between this sprite and another sprite.

Syntax

Java

.distanceToSprite(sprite)

Parameters

Name Data Type Description
sprite Sprite the other sprite to which the distance is calculated

Return

double

distanceToSprite()