Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for Sqrt (0.02 seconds)

  1. doc/go_spec.html

    the non-blank method and field names must be distinct.
    </p>
    
    <p>
    Given defined type <code>Point</code> the declarations
    </p>
    
    <pre>
    func (p *Point) Length() float64 {
    	return math.Sqrt(p.x * p.x + p.y * p.y)
    }
    
    func (p *Point) Scale(factor float64) {
    	p.x *= factor
    	p.y *= factor
    }
    </pre>
    
    <p>
    bind the methods <code>Length</code> and <code>Scale</code>,
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Wed Apr 01 23:39:18 GMT 2026
    - 287.8K bytes
    - Click Count (1)
Back to Top